Re: Using a Java Space from an OSGi bundle

Mike Francis <[email protected]> Thu, 13 Sep 2007 15:16:40 +0100
Newsgroups gmane.comp.java.sun.javaspaces
Organization Paremus
Message-ID <[email protected]>
Harald

Check out the Newton open source project (www.codecauldron.org) there is an
example of Blitz running in an OSGi framework in a scenario similar to you
have described.

Newton is the foundation elements of the commercial Paremus Infiniflow
product, of which there is a free commercial evaluation available. You can
find out further details at http://www.paremus.com/downloads/downloads.html.
[Blatent plug over]

If you have any questions please do not hesitate to contact me.

Regards
Mike

-----Original Message-----
From: Wellmann, Harald [mailto:[email protected]]
Sent: 13 September 2007 14:58
To: [email protected]
Subject: Using a Java Space from an OSGi bundle

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

_______________________________________________________________________
This email has been scanned by both Message Labs and Paremus internal
systems for viruses and inappropriate attachments.  Email suspected of
carrying a virus payload or inappropriate attachment will not be delivered
to you, and the sender will receive an appropriate warning notice.
_______________________________________________________________________


_______________________________________________________________________
Paremus Limited. Registered in England
 No. 4181472
 Registered Office: St Alphage House, 2 Fore Street, London, EC2Y 5DH Postal Address: 107-111 Fleet Street, London, EC4A 2AB
The information transmitted is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
If you received this in error, please contact the sender and delete the material from any computer.
_______________________________________________________________________

===========================================================================
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