2

As the title, I cannot add the Glassfish server to NetBeans IDE 8.2. 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.

JDK: jdk1.8.0_321 Netbeans IDE 8.2

Here is a screen shot:

Add Server Instance window

About in Netbeans Netbeans

Path in System Variable Path in System Variable

Start GlassFish 5.0 in Command Prompt Start GlassFish 5.0 in Command Prompt

WARNING [org.netbeans.modules.options.keymap.LayersBridge]: Invalid shortcut: org.openide.loaders.BrokenDataShadow@3c62f87e[MultiFileObject@d4180b7[Keymaps/NetBeans/D-BACK_QUOTE.shadow]]
WARNING [null]: Last record repeated again.
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Resolving dependencies took: 143 ms
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 0 binary roots took: 1 ms
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: C:\Program Files\NetBeans 8.2\webcommon\jsstubs\domstubs.zip took: 468 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: C:\Program Files\NetBeans 8.2\webcommon\jsstubs\corestubs.zip took: 71 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: C:\Program Files\NetBeans 8.2\webcommon\jsstubs\reststubs.zip took: 101 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 3 source roots took: 640 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
SEVERE [global]
java.lang.UnsupportedClassVersionError: com/sun/appserv/server/util/Version has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at org.netbeans.modules.glassfish.tooling.utils.ServerUtils.getServerVersion(ServerUtils.java:589)
    at org.netbeans.modules.glassfish.common.ServerDetails.getVersionFromInstallDirectory(ServerDetails.java:222)
    at org.netbeans.modules.glassfish.common.ServerDetails.isInstalledInDirectory(ServerDetails.java:305)
    at org.netbeans.modules.glassfish.common.wizards.ServerWizardIterator.isValidInstall(ServerWizardIterator.java:373)
    at org.netbeans.modules.glassfish.common.wizards.AddServerLocationPanel.isValid(AddServerLocationPanel.java:189)
    at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:874)
    at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:822)
    at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.updateState(AddServerInstanceWizard.java:238)
    at org.openide.WizardDescriptor._updateState(WizardDescriptor.java:800)
    at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:1072)
    at org.openide.WizardDescriptor.access$1900(WizardDescriptor.java:92)
    at org.openide.WizardDescriptor$Listener$1.run(WizardDescriptor.java:2208)
    at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1516)
    at org.openide.WizardDescriptor.access$2000(WizardDescriptor.java:92)
    at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:2227)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:487)
    at com.sun.proxy.$Proxy24.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:262)
    at java.awt.Component.processMouseEvent(Component.java:6539)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6304)
    at java.awt.Container.processEvent(Container.java:2239)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2297)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.java:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    at java.awt.Dialog.show(Dialog.java:1084)
    at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1086)
    at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1136)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1108)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:131)
    at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEventAccess(NbMutexEventProvider.java:138)
    at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:98)
    at org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:94)
    at org.openide.util.Mutex.readAccess(Mutex.java:218)
    at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1093)
    at java.awt.Component.show(Component.java:1671)
    at java.awt.Component.setVisible(Component.java:1623)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1005)
    at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.showAddServerInstanceWizard(AddServerInstanceWizard.java:210)
    at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.showAddServerInstanceWizard(AddServerInstanceWizard.java:130)
    at org.netbeans.modules.server.ui.node.AddServerInstanceAction.actionPerformed(AddServerInstanceAction.java:59)
    at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:199)
    at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
    at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
    at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
    at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:202)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:882)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:926)
    at java.awt.Component.processMouseEvent(Component.java:6539)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6304)
    at java.awt.Container.processEvent(Container.java:2239)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2297)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.java:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
SEVERE [global]
java.lang.NullPointerException
    at java.io.File.<init>(File.java:277)
    at org.netbeans.modules.glassfish.common.wizards.AddDomainLocationVisualPanel.initModels(AddDomainLocationVisualPanel.java:193)
    at org.netbeans.modules.glassfish.common.wizards.AddDomainLocationPanel.readSettings(AddDomainLocationPanel.java:185)
    at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:867)
    at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:822)
    at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.updateState(AddServerInstanceWizard.java:238)
    at org.openide.WizardDescriptor._updateState(WizardDescriptor.java:800)
    at org.openide.WizardDescriptor.goToNextStep(WizardDescriptor.java:1072)
    at org.openide.WizardDescriptor.access$1900(WizardDescriptor.java:92)
    at org.openide.WizardDescriptor$Listener$1.run(WizardDescriptor.java:2208)
    at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1516)
    at org.openide.WizardDescriptor.access$2000(WizardDescriptor.java:92)
    at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:2227)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:487)
    at com.sun.proxy.$Proxy24.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:262)
    at java.awt.Component.processMouseEvent(Component.java:6539)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6304)
    at java.awt.Container.processEvent(Container.java:2239)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2297)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.java:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
    at java.awt.Dialog.show(Dialog.java:1084)
    at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1086)
    at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1136)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1108)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:131)
    at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEventAccess(NbMutexEventProvider.java:138)
    at org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:98)
    at org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:94)
    at org.openide.util.Mutex.readAccess(Mutex.java:218)
    at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1093)
    at java.awt.Component.show(Component.java:1671)
    at java.awt.Component.setVisible(Component.java:1623)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1005)
    at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.showAddServerInstanceWizard(AddServerInstanceWizard.java:210)
    at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.showAddServerInstanceWizard(AddServerInstanceWizard.java:130)
    at org.netbeans.modules.server.ui.node.AddServerInstanceAction.actionPerformed(AddServerInstanceAction.java:59)
    at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:199)
    at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
    at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
    at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
    at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:202)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:882)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:926)
    at java.awt.Component.processMouseEvent(Component.java:6539)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6304)
    at java.awt.Container.processEvent(Container.java:2239)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2297)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    at java.awt.Container.dispatchEventImpl(Container.java:2283)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Joe Lam
  • 23
  • 5
  • What version of GlassFish are you using? What version of Java are you using? – skomisa Mar 01 '22 at 23:29
  • GlassFish 4.1.1 is included in my Netbeans. I would like to add GlassFish 5.0.1 in it but nothing happen when press ‘next‘ in Choose Server. I am using JDK 8 – Joe Lam Mar 02 '22 at 02:52
  • I just downloaded file **glassfish-5.0-web.zip** from `https://download.oracle.com/glassfish/5.0/release/index.html`. I then created and ran a Glassfish 5 server that starts and runs just fine, using that unzipped file as the _Installation Location_ on the _Add Server Instance_ screen. I can go to `http://localhost:8080/` on that server. Update your question with more details (rather than adding a comment!) if that does not work for you. If it works, post the solution as an answer. – skomisa Mar 02 '22 at 03:36
  • [1] The entire process of adding the server is also documented in detail in [this answer](https://stackoverflow.com/a/58083919/2985643) to the question [How to add Glassfish 5.0 server in Netbeans 8.2](https://stackoverflow.com/q/58080214/2985643). I'll vote to close your question as a duplicate if (but only if) that resolves your problem. [2] You can also search SO for _"Not a valid GlassFish Server installation"_. You are not the first person to encounter this issue. – skomisa Mar 02 '22 at 03:42
  • I know I am not the first person to encounter this issue. But mine is a little different. My issue is stuck in the "choose server" page and get "Not a valid GlassFish Server Installation" and didn't move to "Installation Location" after press the "next". You can look at my image link in the question. Thank you. – Joe Lam Mar 02 '22 at 03:49
  • Yes - that is certainly different problem. Perhaps try entering something other than _"GlassFish Server"_ in the _Name:_ field (e.g. _"GlassFish Server 5.0.1"_) on the _Add Server Instance_ to see if that changes anything? Also, check for any related error messages in the NetBeans log (**View > IDE Log**). Other than that, all I can suggest is clearing away your cache and/or your user directory and restarting NetBeans, but that's just something to try when nothing else works. You can get their directory paths from the **Help > About** screen. – skomisa Mar 02 '22 at 04:07
  • Hi @skomisa. I tried to _name_ as **GlassFish Server 5.0.1** and it isn't work. Also tried to clear away my cache. The error message in **IDE log** as: `java.lang.UnsupportedClassVersionError: com/sun/appserv/server/util/Version has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0` – Joe Lam Mar 02 '22 at 04:15
  • For the GlassFish instance that you are trying to add, can you provide the link that shows where you found it. (i.e. A link to a web page, not a download link)? That error message suggests that you are trying to use a GlassFish instance compiled with JDK 11 on NetBeans 8.2, which is running with JRE 8, which doesn't make sense to me. Perhaps try downloading and using the 5.01 GlassFish instance from the Oracle link that I cited in an earlier comment because that definitely worked for me a couple of hours ago. I'd avoid using any Eclipse links for your GlassFish download. – skomisa Mar 02 '22 at 05:32
  • @skomisa Thanks for your helping and effort. Here is where I download GlassFish 5.0.1 - Web Profile link: [GlassFish](https://javaee.github.io/glassfish/download). But I think it may not related to downloaded GlassFish since when I add the server, I never can add GlassFish in it. It just stuck in the _Choose Server_ page. Thank you. – Joe Lam Mar 02 '22 at 08:08
  • OK. I installed both forms of server (web and "full") from your link and they both work, so our environments differ. Some things to consider: [1] I am on Windows 10. You? [2] I am using a more recent update of JDK 8 (301) than you (202). Yours is old, and potentially unsafe security-wise, so upgrade JDK 8 if possible. [3] I have environment variable JAVA_HOME set to my JDK 8 path. If yours points to another JDK then modify it, because GlassFish might care about that setting. [4] Remove all existing GlassFish server instances, then restart NetBeans before attempting to **Add Server...**. – skomisa Mar 02 '22 at 09:17
  • [1] I am using Windows 10 too [2] I updated JDK 8 (202 -> 321) [3] I have set environment variable JAVA_HOME to JDK 8(321) path [4] Removed all existing GlassFish server instances. **The issue is still cannot be fixed**. Thanks – Joe Lam Mar 03 '22 at 06:21
  • OK. [1] Open the NetBeans Log (**View > IDE Log**), then try to add the GlassFish server again. It still won't work of course, but does your attempt cause any error messages to get written to the log, as shown in the **Output - IDE Log** window? [2] Try starting the GlassFish server from a **Command Prompt** window instead of NetBeans, just to verify that your download is OK (i.e. The problem is with your environment rather than GlassFish). See section _2. Starting GlassFish_ in the file **README.txt** of the unzipped GlassFish download for details on doing that. – skomisa Mar 03 '22 at 07:01
  • I saw a couple more minor differences between us from your **Help > About** screen shot: [1] I am running an older version of NetBeans 8.2 (**Product Version: NetBeans IDE 8.2 (Build 201609300101)**), but I don't think that is relevant. [2] You are using charset MS950, but I am using UTF-8, so I switched to MS950. But I could still add/start/stop/remove GlassFish 5 with MS950, so that's not an issue. Unfortunately, I am running out of ideas. Perhaps it might be worth focusing on the differences between your PC where GlassFish 5 is working, and your PC where GlassFish 5 can't be installed? – skomisa Mar 03 '22 at 07:32
  • A couple more ideas, neither of which is very appealing: [1] Try [installing Payara 5.181](https://docs.payara.fish/community/docs/release-notes/release-notes-181.html). Why?...because that server is _"based on GlassFish Server Open Source 5 which was released on September 21, 2017"_. From a functionality perspective I don't think you could distinguish between GlassFish 5.0.1 and Payara 5.181. Of course that is only a possible workaround rather than a real solution to your problem, but at least it's an option to consider if you remain stuck. [2] Reinstall NetBeans 8.2. Ugly, but it might work! – skomisa Mar 03 '22 at 07:59
  • [1] The error messages in IDE Log is same with before. [2] I can successfully start GlassFish Server from **Command Prompt**. [3] Reinstallation of Netbeans 8.2 has been tried already. – Joe Lam Mar 03 '22 at 08:10
  • OK. Are you certain that there are no other installations of Java on your machine? You only have JDK 8u321 installed, and nothing else, right? – skomisa Mar 03 '22 at 08:35
  • I have JDK 1.8.0_202 / 1.8.0_311 / 1.8.0_321 / 13 / 17.0.1 installed. – Joe Lam Mar 03 '22 at 09:18
  • OK. [1] It shouldn't matter to NetBeans anyway, but verify that your Windows **PATH** environment variable looks correct, and contains (at most) just one JDK entry. [2] Uninstall/delete any versions of GlassFish other than the one bundled with NetBeans (4.1.1) and the one you downloaded (5.0.1), unless doing that will cause you problems. [3] I just noticed that your **Add Server Instance** screen does not show Payara Server_ as an option, but mine does. I don't know why, but perhaps I installed a Payara plugin years ago... – skomisa Mar 04 '22 at 00:38
  • ...[4] In NetBeans, **Tools>Java Platforms** should show just one platform, for JDK 8u311. Is that the case? [5] Restart NetBeans, and then check the IDE log for errors/exceptions/stack traces. It should be clean. Update your question with anything unexpected. [6] You can access the **Add Server Instance** screen by right clicking the **Servers** node, or **Tools>Servers>Add Server...**. Try the approach you don't normally use. [7] Compare the content of **netbeans.conf** on your working machine with that for the NetBeans instance that has problems. Any significant differences? – skomisa Mar 04 '22 at 00:47
  • [1] My **PATH** in **System Variable** contains just one JDK entry. [2] Deleted all GlassFish from my PC not work. [4] Only one platform is shown in **Java Platforms**. [5] The IDE log remains the same with previous when I click the **Next** button in **Add Server** [6] Tried **Tools>Servers>Add Server...**, also the same. [7] The **netbeans.conf** is exactly the same with my working machine. Thanks – Joe Lam Mar 05 '22 at 03:13
  • Can you update your question with the following if possible: [1] The complete settings for **PATH** [2] The stack trace in text form for the `UnsupportedClassVersionError` exception that you get after clicking **Next**. – skomisa Mar 05 '22 at 06:32
  • Updated the question with **Stack Trace** and complete settings of **PATH**. – Joe Lam Mar 05 '22 at 08:13

1 Answers1

-1

NetBeans 8.2 is outdated and not supposed to work with current Glassfish versions.

Please get a recent NetBeans version: https://netbeans.apache.org/download/index.html

unwichtich
  • 13,712
  • 4
  • 53
  • 66
  • My another PC works well in GlassFish 5 with Netbeans 8.2. I would like to figure out why I cannot in current PC. – Joe Lam Mar 02 '22 at 02:49
  • 1
    The OP is not trying to get NetBeans 8.2 working with _"current Glassfish versions"_. They are using Glassfish 5.0.1, which NetBeans 8.2 supports. Your answer is arguably valid as a comment, but just telling the user to change their entire environment is hardly a reasonable solution for their specific problem. (I don't know about this specific case, but those still using NB 8.2 frequently cannot upgrade anyway - they don't necessarily control which version of NetBeans they can use.) – skomisa Mar 02 '22 at 03:50
  • These details were not in the question when I wrote my answer, please have a look at the first version of the question. – unwichtich Mar 22 '22 at 20:46