Using a Java Space from an OSGi bundle

"Wellmann, Harald" <[email protected]> Thu, 13 Sep 2007 15:58:00 +0200
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <FCCE9B33F9DEDF41B2C7797D6D0D12F3017BB18F@oehhw2ex03.hbi.ad.harman.com>
I'm having a classloader issue when using a JavaSpace from within an
OSGi bundle.

(My JavaSpace is Blitz from the IncaX 4.1 community edition my OSGi
environment is Eclipse 3.2, running under JDK 6.0).

The JavaSpace and the OSGi bundle are running in separate VMs. I can
write an entry to the space from my OSGi bundle, but when trying to take
the entry I've just written:

13.09.2007 14:54:36 org.dancres.blitz.mangler.EntryMangler unMangle
SCHWERWIEGEND: Error during unpack: 
java.lang.ClassNotFoundException:
com.harmanbecker.anaconda.job.space.MaxJobIdEntry
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at
sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:434)
        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:138)
        at
org.dancres.blitz.mangler.EntryMangler.unMangle(EntryMangler.java:86)
        at org.dancres.blitz.remote.BlitzProxy.take(BlitzProxy.java:117)
        at
com.harmanbecker.anaconda.job.test.ReadAndTake.run(ReadAndTake.java:30)
        at
com.harmanbecker.anaconda.main.Activator.run(Activator.java:106)
        at java.lang.Thread.run(Thread.java:619)

How do I ensure that the JavaSpace proxy (loaded via RMI) can load the
classes exported by my bundle?

By the way, I'm surprised that I could load the RMI proxy at all, as my
bundle has no declared dependency on Blitz.

Regards,

Harald Wellmann 
 
*******************************************
innovative systems GmbH Navigation-Multimedia
Geschaeftsfuehrung: Dr. Peter Geiselhart - Kevin Brown - Edwin Summers - Regis Baudot 
Sitz der Gesellschaft: Hamburg - Registergericht: Hamburg HRB 59980 
 
*******************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender und loeschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden.
*******************************************

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html