apache / apache/netbeans

Server not running on Apache Netbeans 18

Open
#6,382 0 comments 0 reactions 0 assignees View on GitHub
kind:bug needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 18

### What happened

I created a new empty application and the servers are not running both Glassfish and Tomcat EE
![Screenshot 2023-08-29 114334](https://github.com/apache/netbeans/assets/28055179/270f9bd2-6608-406d-aff7-e7b5f6809ee6)

### How to reproduce

_No response_

### Did this work correctly in an earlier version?

Apache NetBeans 16

### Operating System

Windows 11 Enterprise Edition

### JDK

JDK 20

### Apache NetBeans packaging

Apache NetBeans provided installer

### Anything else
```

java.lang.NoSuchMethodException: com.sun.appserv.server.util.Version.getFullVersion()
at java.base/java.lang.Class.getMethod(Class.java:2321)
[catch] at org.netbeans.modules.glassfish.tooling.utils.ServerUtils.getServerVersion(ServerUtils.java:571)
at org.netbeans.modules.glassfish.common.GlassfishInstance.create(GlassfishInstance.java:419)
at org.netbeans.modules.glassfish.common.GlassfishInstance.readInstanceFromFile(GlassfishInstance.java:598)
at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.loadServerInstances(GlassfishInstanceProvider.java:450)
at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.init(GlassfishInstanceProvider.java:417)
at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.getProvider(GlassfishInstanceProvider.java:126)
at org.netbeans.modules.glassfish.spi.ServerUtilities.getEe8Utilities(ServerUtilities.java:87)
at org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory.createEe8(Hk2OptionalFactory.java:78)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.netbeans.core.startup.layers.BinaryFS$AttrImpl$MethodAndParams.invoke(BinaryFS.java:730)
at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:660)
at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:506)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:918)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:851)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:914)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:851)
at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:772)
at org.netbeans.core.startup.layers.BinaryFS$FileMap.get(BinaryFS.java:1085)
at org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.getDelegate(ProxyOptionalFactory.java:143)
at org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.finishServerInitialization(ProxyOptionalFactory.java:127)
at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.init(ServerRegistry.java:138)
at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.instancesMap(ServerRegistry.java:159)
at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.getServerInstance(ServerRegistry.java:292)
at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.(ConfigSupportImpl.java:115)
at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.getConfigSupport(J2eeModuleProvider.java:112)
at org.netbeans.modules.web.project.WebProject$CopyOnSaveSupport.initialize(WebProject.java:1696)
at org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java:953)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:219)
at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:60)
at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1321)
at org.netbeans.modules.project.ui.OpenProjectList.access$1600(OpenProjectList.java:116)
at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.loadOnBackground(OpenProjectList.java:513)
at org.netbeans.modules.project.ui.OpenProjectList$LoadOpenProjects.run(OpenProjectList.java:384)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1419)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2034)
```
[Doc2.docx](https://github.com/apache/netbeans/files/12463523/Doc2.docx)
![Screenshot 2023-08-29 114334](https://github.com/apache/netbeans/assets/28055179/ae5c2327-91f7-478b-a0cd-9650011f6ee8)

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Start with the reported NoSuchMethodException at org.netbeans.modules.glassfish.tooling.utils.ServerUtils.getServerVersion, especially ServerUtils.java line 571, and trace how GlassfishInstance.create initializes the server. Reproduce the failure on Apache NetBeans 18 with JDK 20 and compare it with the working NetBeans 16 setup; done means the GlassFish and Tomcat EE servers initialize and run for a new empty application.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.