Skip navigation
ermag
Currently Being Moderated

classloading issue in fragment bundle

May 4, 2012 1:39 AM

Tags: #5.5 #crx #cq5.5 #osgi

I've implemented a custom Persistence Manager that uses Gigaspaces XAP as the backing datastore.

 

I've succeeded in getting CQ5.5 to try to use it by packaging the Persistence Manager and related classes as a fragment bundle with Fragment-Host: com.day.crx.sling.server. StartLevel is 15.

 

However, I get an exception on startup that seems to be related to classloading, OSGi and/or security managers:

 

 

INFO: exception occurred during unicast discovery to localhost:64499 with constraints InvocationConstraints[reqs: {}, prefs: {}]
java.lang.ClassNotFoundException: com.sun.jini.reggie.RegistrarProxy (no security manager: RMI class loader disabled)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
    at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
    at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
    at net.jini.loader.ClassLoading.loadClass(ClassLoading.java:149)
    at net.jini.io.MarshalInputStream.resolveClass(MarshalInputStream.java:296)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
    at com.sun.jini.discovery.DiscoveryV1.doUnicastDiscovery(DiscoveryV1.java:440)
    at net.jini.discovery.LookupDiscovery.doUnicastDiscovery(LookupDiscovery.java:3323)
    at net.jini.discovery.LookupDiscovery.doUnicastDiscovery(LookupDiscovery.java:3339)
    at net.jini.discovery.LookupDiscovery.access$3600(LookupDiscovery.java:695)
    at net.jini.discovery.LookupDiscovery$UnicastDiscoveryTask.run(LookupDiscovery.java:1748)
    at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:408)
2012-maj-04 10:13:09 net.jini.discovery.LookupDiscovery$UnicastDiscoveryTask run

 

The class com.sun.jini.reggie.RegistrarProxy, despite being in the com.sun namespace, is found in the Gigaspaces-jar gs-runtime.jar which is included in the Bundle Classpath of my fragment bundle.

 

Any ideas?

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points