Ian Boyd
Ian Boyd

Reputation: 257085

Cannot add Glassfish server to Netbeans IDE 14

As the title, I cannot add the Glassfish server to NetBeans IDE 14. I pressed the "Add Server..." menu entry, then on the "Choose Server" screen I selected "GlassFish Server". Then, "Not a valid GlassFish Server installation" is shown. I can click the "next" button but the screen does not move on. Anyone know how to fix it? Thank you.

Versions

enter image description here

Java versions

Java version Java class version Java EE Version Glassfish TomEE Tomcat
17 (Java SE 17) 10 (Jakarta EE 10)
13 57
12 56
11 (Java SE 11) 55 10 (Jakarta EE 10)
11 (Java SE 11) 55 9.1 (Jakarta EE 9.1) 6.1
9 53
8 (Java SE 8) 52 9.1 (Jakarta EE 9.1) 6.1
8 (Java SE 8) 52 9 (Jakarta EE 9) 6
8 (Java SE 8) 52 8 (Jakarta EE 8) 5
8 (Java SE 8) 52 8 (Java EE 8) 5
7 (Java SE 7) 7 (Java EE 7) 4
6 (Java SE 6) 6 (Java EE 6) 3
5 (Java SE 5) 5 (Java EE 5)
4 (J2SE 1.4) 4 (J2EE 1.4)
3 (J2SE 1.3) 3 (J2EE 1.3)
2 (J2SE 1.2) 2 (J2EE 1.2)

Research Effort

Bonus Reading

Steps to Reproduce the Problem

Open the project in NetBeans:

enter image description here

So i right-click the project and click Resolve Missing Server Problem...:

enter image description here

Which presets a dialog telling me that i need to add a suitable server instance (whatever servers are, and whatever instances are):

enter image description here

So i click Add Server, where i'm presented with a dialog where i can Choose a server:

enter image description here

I select Glassfish, and click Next, where i'm presented with a dialog where i can choose to download Glassfish:

enter image description here

So i check I have read and accept the license agreement...(click), and click Download Now.... It proceeds to download stuff:

enter image description here

And then it tells me "Not a valid GlassFish server installation":

enter image description here

So i notice a drop-down of Choose server to download:, so i try selecting the 2nd one from the top "GlassFish Server 6.1":

enter image description here

and the re-check the I have read and accept the license agreement...(click)* checkbox, and click Download Now*, but nothing happens:

enter image description here

So i click Back, and then ensure that GlassFish Server is still selected, and click Next:

enter image description here

And now NetBeans simply says Not a valid GlassFish server installation.:

enter image description here

And so i click Next again, and the warning message disappears, but the wizard does not move to the next page:

enter image description here

So i close NetBeans, and delete the C:\Users\Ian\GlassFish_Server folder from my computer:

enter image description here

I then re-launch NetBeans, and repeat the process you see above.

I then created a new Stackoverflow question, and repeated the steps you see above.

Upvotes: 3

Views: 6490

Answers (1)

skomisa
skomisa

Reputation: 17383

The steps you followed to add GlassFish look correct, but your environment is invalid.

First, your Help > About screen shot shows that you are running NetBeans 14 using JDK 1.8.0_332, which is unsupported. From the Release Notes for NetBeans 14:

The Apache NetBeans 14 binary releases require JDK 11+, and officially support running on JDK 11 and JDK 17.

Second, from the release documentation for GlassFish 6.1.0:

GlassFish 6.1 will require JDK 11 as a minimum version.

So the only supported platforms when running Glassfish 6.1.0 on NetBeans 14 are JDK 11 and JDK 17.

For my NetBeans 14 installation I edited netbeans.conf to use JDK 11 (netbeans_jdkhome="C:/Java/jdk-11.0.12" in my case), and then restarted NetBeans and downloaded and installed GlassFish 6.1.0 without any problems. FYI, this is what the Properties screen for the GlassFish server looked like:

GlassFish properties

And this is the screen shown when connecting to localhost on port 8080:

localhost:8080

Notes:

  • Though not directly related to your question, I noticed that when viewing the GlassFish admin console (right click the server node and select View Domain Admin Console) on http://localhost:4848/ I just get a blank screen.
  • It's unfortunate that NetBeans even runs on JDK 1.8 since it is not supported. It would be much more helpful to developers if NetBeans refused to start with an error message such as "JDK 1.8 being used. This is not allowed. Use JDK 11 or greater."
  • Be sure to delete any directories created during your unsuccessful attempts to install GlassFish before reinstalling under JDK 11 or JDK 17.

Upvotes: 3

Related Questions