eclipse-ee4j / glassfish-shoal

Shoal
Other
5 stars 9 forks source link

jxta class loading issue using IBM JDK 1.6 #92

Closed glassfishrobot closed 14 years ago

glassfishrobot commented 15 years ago

Reported issue is with IBM JDK 1.6 on Linux, AIX and Windows. One can work around this issue using IBM JDK 1.5.

Executive summary of bug in IBM JDK 1.6 from Bongjae; (does not include how this breaks jxta)

Given following test code fragment:

Package javaLangPackage = Package.getPackage( "java.lang" ); System.out.println( javaLangPackage.getSpecificationVersion() );

In Sun JDK6

1.6

In IBM JDK6

null

So Package#isCompatibleWith() can return "java.lang.NumberFormatException: Empty version string" exception in IBM JDK6 because specVersion can be null.

Complete details provided by Bongjae:

I tried to test current shoal version in IBM JDK 1.6.

But GMS failed to join the group in IBM JDK 1.6.

Here is error log.

2009. 3. 21 오후 6:21:17 com.sun.enterprise.jxtamgmt.JxtaUtil configureJxtaLogging CONFIG: gms configureJxtaLogging: set jxta logging to default of SEVERE 2009. 3. 21 오후 6:21:18 com.sun.enterprise.jxtamgmt.NetworkManager initWPGF CONFIG: initWPGF storeHome=/home/bluewolf/project/jeus7trunk/target/jeus/domains/dvt/data/gms/dvt 2009. 3. 21 오후 6:21:18 com.sun.enterprise.jxtamgmt.NetworkManager SEVERE: Could not locate World PeerGroup Module Implementation. Throwable occurred: net.jxta.exception.PeerGroupException: Could not locate World PeerGroup Module Implementation. at net.jxta.peergroup.WorldPeerGroupFactory.getDefaultWorldPeerGroupClass(WorldPeerGroupFactory.java:244) at net.jxta.peergroup.WorldPeerGroupFactory.(WorldPeerGroupFactory.java:178) at com.sun.enterprise.jxtamgmt.NetworkManager.initWPGF(NetworkManager.java:623) at com.sun.enterprise.jxtamgmt.NetworkManager.(NetworkManager.java:213) at com.sun.enterprise.jxtamgmt.ClusterManager.(ClusterManager.java:133) at com.sun.enterprise.ee.cms.impl.jxta.GroupCommunicationProviderImpl.initializeGroupCommunicationProvider(GroupCommunicationProviderImpl.java:138) at com.sun.enterprise.ee.cms.impl.jxta.GMSContext.join(GMSContext.java:123) at com.sun.enterprise.ee.cms.impl.common.GroupManagementServiceImpl.join(GroupManagementServiceImpl.java:347) ...

I could know that "Could not locate World PeerGroup Module Implementation" message was concerned with JDK version and jxta platform when I reviewed [Shoal-Users] mailing list.

So I tried to test jxta.jar simply.

D:>java -version java version "1.6.0" Java(TM) SE Runtime Environment (build pwi3260sr1-20080416_01(SR1)) IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260-20080415_18762 (JIT enabled, AOT enabled) J9VM - 20080415_018762_lHdSMr JIT - r9_20080415_1520 GC - 20080415_AA) JCL - 20080412_01

D:>java -jar jxta.jar Starting the JXTA platform in mode : EDGE 2009. 3. 23 오전 11:22:28 net.jxta.platform.NetworkManager configure INFO: Created new configuration. mode = EDGE 2009. 3. 23 오전 11:22:28 net.jxta.platform.NetworkManager startNetwork INFO: Starting JXTA Network! MODE = EDGE, HOME = file:/D:/.cache/BootEdge/ 2009. 3. 23 오전 11:22:28 net.jxta.impl.peergroup.StdPeerGroup isCompatible WARNING: Failure handling compatibility statement Throwable occurred: java.lang.NumberFormatException: Empty version string at java.lang.Package.isCompatibleWith(Package.java:223) at net.jxta.impl.peergroup.StdPeerGroup.isCompatible(StdPeerGroup.java:414) at net.jxta.impl.peergroup.GenericPeerGroup$1.compatible(GenericPeerGroup.java:131) at net.jxta.impl.loader.RefJxtaLoader.findClass(RefJxtaLoader.java:254) at net.jxta.impl.loader.RefJxtaLoader.findModuleImplAdvertisement(RefJxtaLoader.java:350) at net.jxta.peergroup.WorldPeerGroupFactory.getDefaultWorldPeerGroupClass(WorldPeerGroupFact ory.java:241) at net.jxta.peergroup.WorldPeerGroupFactory.(WorldPeerGroupFactory.java:178) at net.jxta.peergroup.NetPeerGroupFactory.(NetPeerGroupFactory.java:204) at net.jxta.platform.NetworkManager.startNetwork(NetworkManager.java:410) at net.jxta.impl.peergroup.Boot.main(Boot.java:139) Uncaught Throwable caught by 'main': net.jxta.exception.PeerGroupException: Could not locate World PeerGroup Module Implementation. at net.jxta.peergroup.WorldPeerGroupFactory.getDefaultWorldPeerGroupClass(WorldPeerGroupFact ory.java:244) at net.jxta.peergroup.WorldPeerGroupFactory.(WorldPeerGroupFactory.java:178) at net.jxta.peergroup.NetPeerGroupFactory.(NetPeerGroupFactory.java:204) at net.jxta.platform.NetworkManager.startNetwork(NetworkManager.java:410) at net.jxta.impl.peergroup.Boot.main(Boot.java:139)

D:>

I could know that this error was related to Package.isCompatibleWith() method.

Here is my test code.


Package javaLangPackage = Package.getPackage( "java.lang" ); System.out.println( javaLangPackage.getSpecificationVersion() );

In Sun JDK6

1.6

In IBM JDK6

null

So Package#isCompatibleWith() can return "java.lang.NumberFormatException: Empty version string" exception in IBM JDK6 because specVersion can be null.

glassfishrobot commented 6 years ago
glassfishrobot commented 15 years ago

@glassfishrobot Commented Reported by @jfialli

glassfishrobot commented 15 years ago

@glassfishrobot Commented @jfialli said: duplicate of 91

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA SHOAL-92

glassfishrobot commented 14 years ago

@glassfishrobot Commented Marked as duplicate on Wednesday, June 23rd 2010, 4:11:06 am