-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassNotFoundException while using Java 1.7 (OpenJDK/Ubuntu) #8
Comments
That looks like a classpath or codebase problem to me. I have a recollection that between JDK 1.6 and 1.7 there were some impactful security changes though I can't comment on OpenJDK's status specfically. As the error appears to be when ServiceStarter attempts to unpack the proxy for the service it's building locally, I doubt it's going to cause you problems. It might be some missing command-line for ServiceStarter. Equally, it could be the scripts and/or configs. Without seeing them, I can't be sure. |
I am merely trying to launch the version that I downloaded and installed from https://code.google.com/p/blitz-javaspaces/downloads/detail?name=installer_pj_2_1_7.jar (updated 12-2012), i.e. these are the stock downloaded versions with no customizations from me except for the necessary changes specified in the documentation (java_home, etc.). The behavior is strongly correlated to the java version from what I see. When I change the variables in blitz.sh to point to Java 1.6 with no other changes, it works fine. Change back to 1.7 and it breaks as above. I will read through the 1.7 security changes to see why my setup generates this error. |
Mmm, I only have Macs here, I may have a JDK 1.7 around. If so I'll see if I can figure it out for you. |
You need to set the following property: -Djava.rmi.server.useCodebaseOnly=false This was changed in jdk7 for security reasons, to prevent remote code execution vulnerabilities. Recommend configuring services to use JERI rather than JRMP, then you don't need to set the above property. |
Thanks @pfirmstone - while I no longer work on this project/team, I will be sure to point them to this issue again. |
No problem. They can also ask at Apache River (Jini), if / when they need some help. https://river.apache.org Cheers, Peter. |
I am trying to launch Blitz 2.1.7 with JINI 2.1 using the blitz.sh script with Java 1.7 (OpenJDK). It runs fine when it is launched with Java 1.6 (OpenJDK) but with Java 1.7, I get the following errors. I have verified that the jars in question (jsk.dl.jar, reggie-dl.jar, mahalo-dl.jar) are accessible on the same machine via wget. Remember that when I change blitz.sh to adjust the JAVA_HOME variable from 1.7 to 1.6, these errors don't occur. In either case, the Blitz instance appears to "work fine" with the test application.
Nov 05, 2015 4:35:44 PM org.dancres.blitz.remote.BlitzServiceImpl initImpl
INFO: Space core is up, starting JoinManager
Nov 05, 2015 4:35:44 PM com.sun.jini.start.ServiceStarter checkResultFailures
WARNING: Exception creating service.
java.lang.ClassNotFoundException: com.sun.jini.reggie.RegistrarProxy
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.jini.loader.pref.PreferredClassProvider.loadClass(PreferredClassProvider.java:613)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at com.sun.jini.start.NonActivatableServiceDescriptor.create(NonActivatableServiceDescriptor.java:644)
at com.sun.jini.start.ServiceStarter.create(ServiceStarter.java:290)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:470)
Nov 05, 2015 4:35:44 PM com.sun.jini.start.ServiceStarter checkResultFailures
WARNING: Associated service descriptor [1]: [http://localhost:8081/reggie-dl.jar http://localhost:8081/jsk-dl.jar, policy/policy.all, /home/user/jini2_1/lib/reggie.jar, com.sun.jini.reggie.TransientRegistrarImpl, [config/reggie.config], com.sun.jini.start.NonActivatableServiceDescriptor$1@4270c0d1, BasicProxyPreparer[]]
Nov 05, 2015 4:35:44 PM com.sun.jini.start.ServiceStarter checkResultFailures
WARNING: Exception creating service.
java.lang.ClassNotFoundException: com.sun.jini.mahalo.TxnMgrProxy
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.jini.loader.pref.PreferredClassProvider.loadClass(PreferredClassProvider.java:613)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at com.sun.jini.start.NonActivatableServiceDescriptor.create(NonActivatableServiceDescriptor.java:644)
at com.sun.jini.start.ServiceStarter.create(ServiceStarter.java:290)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:470)
Nov 05, 2015 4:35:44 PM com.sun.jini.start.ServiceStarter checkResultFailures
WARNING: Associated service descriptor [2]: [http://localhost:8081/mahalo-dl.jar http://localhost:8081/jsk-dl.jar, policy/policy.all, /home/user/jini2_1/lib/mahalo.jar, com.sun.jini.mahalo.TransientMahaloImpl, [config/mahalo.config], com.sun.jini.start.NonActivatableServiceDescriptor$1@4270c0d1, BasicProxyPreparer[]]
Nov 05, 2015 4:35:44 PM com.sun.jini.start.ServiceStarter checkResultFailures
WARNING: Exception creating service.
java.lang.ClassNotFoundException: org.dancres.blitz.remote.ConstrainableBlitzProxy
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.jini.loader.pref.PreferredClassProvider.loadClass(PreferredClassProvider.java:613)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at com.sun.jini.start.NonActivatableServiceDescriptor.create(NonActivatableServiceDescriptor.java:644)
at com.sun.jini.start.ServiceStarter.create(ServiceStarter.java:290)
at com.sun.jini.start.ServiceStarter.main(ServiceStarter.java:470)
The text was updated successfully, but these errors were encountered: