Re: GRADLE: 'Web Pages' project node gone in NB 12.1?

2020-09-25 Thread Fred Welland
You fixed it!

Hehe.   So thinking about how I'd get you the project;  I just fired up
12.1 again.Still no "Web Pages" node.   Interestingly, "Generated
Sources" was gone -- but that isn't really important.

I figured I'd rifle thru options and plugins one last time.I
noticed Plugins->Installed->Java Web and EE was not activated.I
activated that; and that really didn't change anything.   Closed project;
then shutdown 12.1; restarted 12.1 and then re-opened project -- BOOM --
'Web Pages' is there.Sources [generated] is gone - but one SHIFT-F11 it
was back.   I can deal with that.

NOTE:  Project in question is a POC and a bit of an odd-duck:   JSF using
hollowed Bootable Wildfly 21beta.  Sadly bootable WF is only in form of
maven plugin -- so this project has a pom.xml too; only for making the
hollowed WF jar -- all the heavy lifting is in gradle (including gradle
exec calls to 'mvnw').I can still make it available to you if you'd
like.



On Thu, Sep 24, 2020 at 11:42 PM Laszlo Kishalmi 
wrote:

> Well, actually I do need your setup or a sample project which does not
> work for you. Just have the time check the web projects and found that the
> Web Pages node is actually there. Even when creating an application from
> the Wizard.
>
> The only issue I see with 12.1 (and before) that if you right click on the
> web pages, then select JSP the web pages is not offered a root folder for
> the JSP.
>
> That is fixed in the development builds.
>
> As of the gererated sources. Unfortunately Gradle generates their folder
> regardless if it is being used or not. I have not find the time to hide
> them when they are empty. Probably in 12.2 ...
> On 9/24/20 12:19 PM, Fred Welland wrote:
>
> Oh ok.
>
> Lemme know if you need any more data about my setup.   Also -- in 12.1 I
> do see the generated sources project node -- although  that doesn't apply
> for this project (be nice to suppress when not needed).
>
> On Thu, Sep 24, 2020 at 2:18 PM Laszlo Kishalmi 
> wrote:
>
>> That's a good question. I'm afraid I have to debug what's happened with
>> the Web Pages node.
>>
>> On 9/24/20 11:09 AM, Fred Welland wrote:
>> > Kicking tires on NB12.1,  I have a simple gradle build that applies
>> > 'war' plugin.
>> >
>> > In NB 12.0; this pretty much works and has a nice 'Web Pages' node in
>> > the project window: it lets me navigate src/main/webapp/.
>> >
>> > Load the same project in NB 12.1 and that node is gone.
>> >
>> > Is there a way to make it come back?  Do I gotta re-enable something
>> > in NB 12.1?
>> >
>> > NOTE:  I let NB 12.1 copy over all my settings/plugins from my NB 12
>> > config.
>> >
>> > FWIW:   running NB12 & 12.1 under JDK 14 -- that said this project is
>> > a JDK 8 project so I use that in the compile/build step.   Oh and
>> > Gradle 6.6 (oh and running under fedora 31) -- geeze ok:
>> >
>> > to run NB 12.0/12.1:   Java: 14.0.2; OpenJDK 64-Bit Server VM 14.0.2+12
>> > to build:   openjdk version "1.8.0_265"
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
>> For additional commands, e-mail: users-h...@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>
>>


Alt-insert "Use an Entity Manager" does not work

2020-09-25 Thread Richard Grin

Hello,

In a Maven Web application, NetBeans 12.1, Windows 10.

Alt-Insert "Use an Entity Manager..." in an EJB stateless inserts code 
for a bean managed transaction, even if the transaction is managed by 
the container.


Code inserted:

  @PersistenceContext(unitName = "customerPU")
  private EntityManager em;
  @Resource
  private javax.transaction.UserTransaction utx;

  public void persist(Object object) {
    try {
  utx.begin();
  em.persist(object);
  utx.commit();
    } catch (Exception e) {
  Logger.getLogger(getClass().getName()).log(Level.SEVERE, 
"exception caught", e);

  throw new RuntimeException(e);
    }
  }

Code that should have been inserted:

@PersistenceContext(unitName = "customerPU")
  private EntityManager em;

public void persist(Object object) {
  em.persist(object);
}

This is a regression. It worked in older versions of NetBeans but I 
can't remember which ones.


Richard


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists