This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 250165 - Make The Version Checks More Lenient
Summary: Make The Version Checks More Lenient
Status: RESOLVED DUPLICATE of bug 253008
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 8.1
Hardware: PC Mac OS X
: P2 normal with 5 votes (vote)
Assignee: Petr Hejl
Depends on:
Reported: 2015-02-02 16:15 UTC by abien
Modified: 2015-08-25 10:03 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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:
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 ***