Re: NetBeans for Java EE 8

2019-06-15 Thread Richard Grin
Thanks a lot Josh for the information.  I have just read your message after 
answering Geerjan (whom I was asking for it).

Le 15/06/2019 à 17:37, Josh Juneau a écrit :
Hi Richard,

The PR for inclusion of Java EE 8 support has been issued...I'm just working 
out a few minor build discrepancies...hoping to get it into the next release.  
As far as creating a Java EE 8 application project, you can also use the Maven 
archetype that I developed for use with Apache NetBeans:

https://github.com/juneau001/javaee8-archetype

The Java EE 8 support uses this archetype when it creates a new Java EE 8 
project.  The Java EE 8 support also adds support for GlassFish 5.0.1 and 
GlassFish 5.1.  Let me know if you have any questions.


Josh Juneau
juneau...@gmail.com
http://jj-blogger.blogspot.com
https://www.apress.com/us/search?query=Juneau



On Sat, Jun 15, 2019 at 5:30 AM Geertjan Wielenga 
mailto:geert...@apache.org>> wrote:

Can you be very explicit about ‘but that is not quite the case these days’? Do 
you mean specifically the need for an installer, which already exists, but you 
can’t find it? We need very explicit statements because we really want to 
support you.

And what do you mean explicitly about NetBeans ‘adapted to Java EE 8’, very 
explicitly? We have a PR right now about Payara integration by the Payara team, 
as well as a PR by Josh Juneau about various UI elements explicitly including 
Java EE 8. So these are available but not integrated yet.

Though using Maven you could set up an archetype, e.g., the AirHacks archetypes 
by Adam Bien, which support Java EE 8, and deploy to GlassFish, from Apache 
NetBeans 11.0 onwards.

Gj


On Sat, 15 Jun 2019 at 11:46, Richard Grin 
mailto:richard.g...@univ-cotedazur.fr>> wrote:
Hi,

I'm preparing a course on Java EE for this fall. When can I expect a
NetBeans version adapted to Java EE 8? Is it already planned?

Will the last versions of Payara be included in the available servers?

I have been using NetBeans for a long time because the installation of
the working environment was very simple for students but this is not
quite the case these days.

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


--
Cordialement,

Richard Grin


Re: NetBeans for Java EE 8

2019-06-15 Thread Richard Grin
Hi Geertjan,

A use case that you can reproduce with NetBeans 11.0 (Build 
incubator-netbeans-release-404-on-20190319)
Java: 1.8.0_172; Java HotSpot(TM) 64-Bit Server VM 25.172-b11
Runtime: Java(TM) SE Runtime Environment 1.8.0_172-b11
System: Windows 10 version 10.0 running on amd64; Cp1252; fr_FR (nb).

Menu File > New Project. Java with Maven and Web Application. Next.

I give a name to the project. Next.

Server Payara 5.192. No choice for Java EE 8. I choose Java EE 7 Web. Click 
Finish.

If I want to use a wizard to generate some code:

Right click on the project > New > Entity Classes from Database.

Right click on the project > New > JSF Pages from Entity Classes. Add all the 
entity classes. Next.

I choose JSF 2.2 (no "JSF 2.3").

[  Just by the way, at this moment there is a problem if I launch the 
application by mistake. NetBeans is stuck for a very long time because Payara 
cannot start and it is not possible to cancel quickly the process by clicking 
on the square linked to the process at the bottom of the NetBeans window.  ]

If I want to use Java EE 8 instead of Jva EE 7, I must make changes in pom;xml 
(which ones exactly? Not so clear) and in web.xml and persistence.xml (change 
the versions).

Instead I could use some Maven archetypes as you suggest; I think I will choose 
this solution if nothing is changed in NetBeans before my course. I have found 
2 archetypes: from Adam Bien and from Philip Riecks.

But with the older versions of NetBeans and Java EE, all was out of the box and 
it was a big advantage over other IDEs. It's no longer quite the case today 
with NetBeans 11 and Java EE 8. It is the simple explanation of what I said in 
my previous message. In my course I have a lot of things to explain in a very 
short time and don't want to spend too much time in installation details or on 
Maven.

It's good news that Payara will soon be integrated in NetBeans without an 
external plugin. Where can I find the elements by Josh Juneau about Java EE 8? 
Will they be integrated in the next version of NetBeans? Around what date will 
it be ready (to find out if I can wait before preparing my course)?

Thanks for the good work of the whole team working on NetBeans.

Best regards,

Richard

Le 15/06/2019 à 12:30, Geertjan Wielenga a écrit :

Can you be very explicit about ‘but that is not quite the case these days’? Do 
you mean specifically the need for an installer, which already exists, but you 
can’t find it? We need very explicit statements because we really want to 
support you.

And what do you mean explicitly about NetBeans ‘adapted to Java EE 8’, very 
explicitly? We have a PR right now about Payara integration by the Payara team, 
as well as a PR by Josh Juneau about various UI elements explicitly including 
Java EE 8. So these are available but not integrated yet.

Though using Maven you could set up an archetype, e.g., the AirHacks archetypes 
by Adam Bien, which support Java EE 8, and deploy to GlassFish, from Apache 
NetBeans 11.0 onwards.

Gj


On Sat, 15 Jun 2019 at 11:46, Richard Grin 
mailto:richard.g...@univ-cotedazur.fr>> wrote:
Hi,

I'm preparing a course on Java EE for this fall. When can I expect a
NetBeans version adapted to Java EE 8? Is it already planned?

Will the last versions of Payara be included in the available servers?

I have been using NetBeans for a long time because the installation of
the working environment was very simple for students but this is not
quite the case these days.

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


--
Cordialement,

Richard Grin


Netbeans keeps asking for Certificate

2019-06-15 Thread Helmut Leininger
Hi,

every time (after new start of Netbeans) when I start editing a .fxml
file, Netbeans asks for accepting a license from Oracle.


What can I do to accept this permanently ?

Regards
Helmut


<>

signature.asc
Description: OpenPGP digital signature


Re: NetBeans for Java EE 8

2019-06-15 Thread Josh Juneau
Hi Richard,

The PR for inclusion of Java EE 8 support has been issued...I'm just
working out a few minor build discrepancies...hoping to get it into the
next release.  As far as creating a Java EE 8 application project, you can
also use the Maven archetype that I developed for use with Apache NetBeans:

https://github.com/juneau001/javaee8-archetype

The Java EE 8 support uses this archetype when it creates a new Java EE 8
project.  The Java EE 8 support also adds support for GlassFish 5.0.1 and
GlassFish 5.1.  Let me know if you have any questions.


Josh Juneau
juneau...@gmail.com
http://jj-blogger.blogspot.com
https://www.apress.com/us/search?query=Juneau




On Sat, Jun 15, 2019 at 5:30 AM Geertjan Wielenga 
wrote:

>
> Can you be very explicit about ‘but that is not quite the case these
> days’? Do you mean specifically the need for an installer, which already
> exists, but you can’t find it? We need very explicit statements because we
> really want to support you.
>
> And what do you mean explicitly about NetBeans ‘adapted to Java EE 8’,
> very explicitly? We have a PR right now about Payara integration by the
> Payara team, as well as a PR by Josh Juneau about various UI elements
> explicitly including Java EE 8. So these are available but not integrated
> yet.
>
> Though using Maven you could set up an archetype, e.g., the AirHacks
> archetypes by Adam Bien, which support Java EE 8, and deploy to GlassFish,
> from Apache NetBeans 11.0 onwards.
>
> Gj
>
>
> On Sat, 15 Jun 2019 at 11:46, Richard Grin 
> wrote:
>
>> Hi,
>>
>> I'm preparing a course on Java EE for this fall. When can I expect a
>> NetBeans version adapted to Java EE 8? Is it already planned?
>>
>> Will the last versions of Payara be included in the available servers?
>>
>> I have been using NetBeans for a long time because the installation of
>> the working environment was very simple for students but this is not
>> quite the case these days.
>>
>> 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
>>
>>


Re: Netbeans - FavaFX - FXML: Location not set

2019-06-15 Thread Helmut Leininger
Hi,

after trying at least 15 of the supposed solutions without success, I
found the problem.

It was a simple LowerCase/UpperCase mixup:

 Windows is niot case-sensitive in filename --> running from IDE is ok.
Java Runtimes are case-sensitive when searching in the .jar file -->
problem (fenster1.fxml <--> Fenster1.fxml)

Thanks
Helmut

Am 15.06.2019 um 12:23 schrieb Geertjan Wielenga:
> When I google ‘JavaFX location is not set’, I see quite a few
> responses and solutions.
>
> Gj
>
>
> On Sat, 15 Jun 2019 at 11:42, Helmut Leininger  > wrote:
>
> Hi,
>
> I do not know if this is the correct place to ask.
>
> I am running Windows10, netbeans 11,openjdk 12, javafx 12.
>
> I am developping a modular javafx application, using Ant (i.e. no
> Maven,
> no Gradle).
>
> I have several modules (Mainmodule, Tools, UI). In the UI module
> is the
> package MainWindow, where the MainApp, all controllers and all
> FXML-files reside.
> In the MainController, when a certain Button is clicked, I open
> another
> Window (of the same package).
>
> The code sniplet:
>
> FXMLLoader fxmlLoader =3D new
> FXMLLoader(getClass().getResource("fenster1.fxml"));
> System.out.println("Location: " + fxmlLoader.getLocation());
> Parent rootFenster1 =3D (Parent) fxmlLoader.load ();
> Fenster1 =3D new Stage();
> ...
>
>
> This works well when run from the IDE. When run from the comand
> line, I
> get the following errors whenn trying to open the second window:
>
> dist>C:\OpenSourceTools\jdk-12/bin/java
> --module-path=3D%JAVAFX_HOME%\lib
> --add-modules=3Djavafx.controls,javafx.fxml -cp UI.jar
> MainWindow.MainApp
> Location: null
> java.lang.IllegalStateException: Location is not set.
> at
> javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459)
> at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435
>
>
> What has to be done that the FXMLLoader can find the FXML file
> also when
> run from the comand line?
>
> Regards
>
> Helmut
>
<>

signature.asc
Description: OpenPGP digital signature


Re: Netbeans - FavaFX - FXML: Location not set

2019-06-15 Thread Geertjan Wielenga
When I google ‘JavaFX location is not set’, I see quite a few responses and
solutions.

Gj


On Sat, 15 Jun 2019 at 11:42, Helmut Leininger  wrote:

> Hi,
>
> I do not know if this is the correct place to ask.
>
> I am running Windows10, netbeans 11,openjdk 12, javafx 12.
>
> I am developping a modular javafx application, using Ant (i.e. no Maven,
> no Gradle).
>
> I have several modules (Mainmodule, Tools, UI). In the UI module is the
> package MainWindow, where the MainApp, all controllers and all
> FXML-files reside.
> In the MainController, when a certain Button is clicked, I open another
> Window (of the same package).
>
> The code sniplet:
>
> FXMLLoader fxmlLoader =3D new
> FXMLLoader(getClass().getResource("fenster1.fxml"));
> System.out.println("Location: " + fxmlLoader.getLocation());
> Parent rootFenster1 =3D (Parent) fxmlLoader.load ();
> Fenster1 =3D new Stage();
> ...
>
>
> This works well when run from the IDE. When run from the comand line, I
> get the following errors whenn trying to open the second window:
>
> dist>C:\OpenSourceTools\jdk-12/bin/java --module-path=3D%JAVAFX_HOME%\lib 
> --add-modules=3Djavafx.controls,javafx.fxml
> -cp UI.jar MainWindow.MainApp
> Location: null
> java.lang.IllegalStateException: Location is not set.
> at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459)
> at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435
>
>
> What has to be done that the FXMLLoader can find the FXML file also when
> run from the comand line?
>
> Regards
>
> Helmut
>


NetBeans for Java EE 8

2019-06-15 Thread Richard Grin
Hi,

I'm preparing a course on Java EE for this fall. When can I expect a 
NetBeans version adapted to Java EE 8? Is it already planned?

Will the last versions of Payara be included in the available servers?

I have been using NetBeans for a long time because the installation of 
the working environment was very simple for students but this is not 
quite the case these days.

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



Re: NB11 hangs (as well as NB10) on downloading HTTP Javadoc

2019-06-15 Thread Lars Bruun-Hansen
Hi Gary,

You are affected by NETBEANS-58. (evident from your thread dump,
thanks for that).

For the benefit of the discussion I'll try to explain in detail. Bear with me.

For the deadlock to happen, the following conditions must apply:

- You use Windows
- Your NB uses a network proxy to reach internet (probably not
something you've set explicitly, NB will by default pick up your OS
settings). Said network proxy uses SPNEGO for authentication. (aka
'Windows Integrated Authentication' as MS tends to call it)
- You do not have Windows Registry key
HKLM\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters\allowtgtsessionkeyset
set to true. The default is false, so most people will have it like
that and since it is in the "System" space most people will not have
the permission to change it themselves.

And that, my friend, is you!

The deadlock happens when NB tries to access the Internet from a
background thread. Sometimes this is caused by a direct action from
the user (e.g.you ask it to download Javadocs for a Maven dependency)
but often it is not something the user knows about as such, meaning
the IDE will will freeze for seemingly no reason.

What happens is that Java cannot obtain a Kerberos Session Key from
the Windows OS, even if you are logged into a domain. The reason why a
Java application cannot do this - while for example a .NET
application, your favorite browser (Chrome, Firefox, Edge) or indeed
just about any other application can do this without problems - is
long and winding and dates back to Sun's (and later Oracle's)
arrogance towards using Windows's SSPI api because it "is not a full
implementation of GSSAPI". In other words: While just about any other
Windows application can do a Kerberos authentication, a Windows
application using Java de-facto cannot. I don't see this changing
anytime soon as there isn't a lot of focus (from anyone) on Java on
the desktop.

Okay, so Java cannot obtain a Kerberos Session Key from Windows. This
means it cannot do promptless authentication against the proxy as was
the intention. NB is actually a bit clever here as it tries to remedy
this situation of no credentials by physically prompting you for it.
(a plain-vanilla Java application would just fail in this situation).
This is where the trouble begins because a deadlock happens. The
deadlock causes the Swing dispatch thread to block (line 976 in your
dump) and the application will freeze as a result.

The deadlock happens - in my mind - because NB Platform uses
all-locking classloaders. This is a recipe for deadlocks, not just in
this case, but in many other cases too. You can read more about it in
NETBEANS-106.

One of the issues here is that this problem doesn't really affect most
developers who work on the Apache NetBeans code base. We are all on
Mac or Linux and for sure not on a corporate network with SPNEGO
authentication. For this reason, it is difficult for most NB
committers to relate to the problem. We can't fix what we can't see.
In the interest of transparency I created a minimal Swing example
which showcases the problem by mimicking what the NB Platforms does.
https://issues.apache.org/jira/browse/NETBEANS-58?focusedCommentId=16224149=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16224149.
It deadlock on Mac and Linux too. The point here is that you really
have to mimick what NB Platform does in order to provoke the deadlock.
The deadlock doesn't happen for anyone else using the Java platform,
just us.

Prior to Oracle implementing fix for JDK-8032832, NetBeans
applications (e.g. the IDE) were not affected. This has led to the
false conclusion that that particular fix was the true cause of the
problem for the NB Platform app. It isn't. It was just sheer luck that
it had worked well in the NB Platform up until that point.

The way forward?
A number of workarounds has been floating around, all of them by me.
(custom Authenticator and what not). They try to side-step the
problem, not fix it. Again, the true problem, IMHO, is the all-locking
NB Platform classloader. Others may have other opinions on this.
Changing the NB Platform classloader's locking mechanism is for sure
something that has to be done with great care. NETBEANS-106 explains
more.

Gary, for your immediate problem I suggest to set your proxy
credentials explicitly in NB Options and see it that helps. Be careful
though: When your Windows password changes and you forget to change in
NB Options too, then I'm guessing the deadlock will come back. A more
favorable action would be to set the Windows Registry key mentioned at
the top of my rant ... if possible.


/Lars







On Sat, Jun 15, 2019 at 2:55 AM Javier Ortiz  wrote:
>
> I see that type of 'freeze' if my settings.xml is very restrictive and for 
> some reason there's no connection to company maven repository, i.e. VPN 
> connection is down.
>
> On Fri, Jun 14, 2019, 5:57 PM Greenberg, Gary  wrote:
>>
>> Let it fail with some error message that