简体   繁体   中英

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

在此处输入图像描述

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:

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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" :

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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

在此处输入图像描述

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.

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 属性

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

本地主机: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.

Faced the problem when installing Glassfish 6.1 on Netbeans 14 (with JDK 11 as java platform). The error message appeared "Authorization failed while checking glassfish server status".I m currently using windows 10 version. I already used also JDK 17 before but it didnt work at all. Anyone can give suggestion how to fix it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM