Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 250165

Summary: Make The Version Checks More Lenient
Product: serverplugins Reporter: abien <abien>
Component: GlassFishAssignee: Petr Hejl <phejl>
Status: RESOLVED DUPLICATE QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: geertjan
Version: 8.1   
Target Milestone: TBD   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:

Description abien 2015-02-02 16:15:20 UTC
NetBeans does not recognize patched version of the application servers. 

e.g. to add "payara 4.1.1..." as GlassFish 4.1, you will have to perform the following code: 

mv glassfish/lib/install/applications/__admingui/WEB-INF/lib/console-core-4.1.151.jar glassfish/lib/install/applications/__admingui/WEB-INF/lib/console-core-4.1.jar


Could you just check the existence of the console-core.jar without any particular version number (or at least omit the minor versions)
Comment 1 Geertjan Wielenga 2015-02-03 13:42:32 UTC
Prioritizing to investigate this.
Comment 2 Geertjan Wielenga 2015-02-03 13:49:31 UTC
Related discussion: 

https://github.com/payara/Payara/issues/186
Comment 3 ivar_grimstad 2015-04-18 17:42:34 UTC
Also applies to nightly builds of GlassFish 4.1 where the jar is called console-core-4.2-SNAPSHOT.jar
Comment 4 Reza_Rahman 2015-08-24 23:10:09 UTC
Interestingly enough I ran into the same issue while trying to run a local private build from GlassFish trunk. Mine also winds up being named console-core-4.2-SNAPSHOT.jar.

Would be nice to get this fixed.
Comment 5 TomasKraus 2015-08-25 09:00:45 UTC
This looks like some old piece of code was missed somewhere. There is a new org.netbeans.modules.glassfish.tooling.utils.ServerUtils#getServerVersion(String) method that reads version from com.sun.appserv.server.util.Version class stored in common-util.jar. If this fails, Manifest Bundle-Version value is used.

Usage of console-core-* and other similar things is wrong and shall be replaced with this new code.

Problem can be with snapshot builds where com.sun.appserv.server.util.Version version numbers are not set properly and in this case Manifest Bundle-Version is checked. As far as I remember, it was returning GlassFishVersion.GF_DEVEL for such a build and used highest known version to configure such a server.

I did not check payara because it was not here when I was revritting this piece of code.

Anyway, there are few things to check:
 * Why there is a check based on console-core-*.jar? It should be replaced with org.netbeans.modules.glassfish.tooling.utils.ServerUtils#getServerVersion(String) which is based on real version numbers stored in promoted GlassFich builds.
 * Check org.netbeans.modules.glassfish.tooling.utils.ServerUtils#getServerVersion(String) with payara to see if it works and eventually extend check to cover this fork too.
Comment 6 Petr Hejl 2015-08-25 10:03:18 UTC
This was already resolved in dev build.

*** This bug has been marked as a duplicate of bug 253008 ***
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo