Re: Blitz Javaspaces with Plugins (Classloader Problem)

Dan Creswell <[email protected]> Mon, 25 Sep 2006 14:22:56 +0100
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Christian Hager wrote:
> Does nobody have any idea how to solve my problem. Maybe it helps to say
> that jpf is kind of like Eclipse RCP. Maybe this is more known than jpf.
>

Whilst the community has a fairly good understanding of the classloader
issues typically encountered with Jini, each plugin, framework,
container, app server etc has it's own way of doing things.

Thus, I suspect the reason you're getting no response is because no-one
has experience with your specific framework.

I am actually Blitz's maintainer and whilst I am more than happy looking
at these kinds of issues I only have so many spare cycles and whilst
this issue is on my todo list I cannot guarantee a timely response -
unfortunately, work that pays the bills has to come first.

> Or is JINI in general incompatible to plugin frameworks?
>

Not at all - many people are succeeding with various workarounds and
sometimes with no workarounds.  A number of Blitz's users for example
are running fine with GlassFish and there's an integration with Spring
as well (though I didn't write it and can't vouch for it's quality).

The real problem is that your case is unique and we have no prior
knowledge to work from.  That takes time to debug and people only have
so much time.

In this particular case, I am confused as to why your writer works but
your taker doesn't.  Are these two things running in separate plugins?
What other differences are there?

Both Writer and Taker in this case would need access to Entry which
implies that something is different between how you've setup Writer
versus Taker - i.e.  you have some configuration difference etc.

Hope that helps,

Dan.


> Christian Hager
>
> ----- Original Message -----
>
>     *From:* Christian Hager <mailto:[email protected]>
>     *To:* [email protected]
>     <mailto:[email protected]>
>     *Sent:* Thursday, September 21, 2006 5:42 PM
>     *Subject:* Blitz Javaspaces with Plugins (Classloader Problem)
>
>     Hello again,
>
>     I started today to use Blitz in our Apllication. Hereby I
>     encountered the following problem and now I'm hoping anyone here
>     could help me solving it.
>
>     I'm trying to use Blitz together with the JPF Plugin Framework used
>     in our Application (http://jpf.sourceforge.net/). But when doing so
>     I encounter a Problem with the classloaders because every Plugin has
>     its own classloader. I'm getting the following Stacktrace.
>
>     Exception in thread "org.ac.sql.rcode.client"
>     java.lang.NoClassDefFoundError: net/jini/core/entry/Entry
>      at java.lang.ClassLoader.defineClass1(Native Method)
>      at java.lang.ClassLoader.defineClass(Unknown Source)
>      at java.security.SecureClassLoader.defineClass(Unknown Source)
>      at java.net.URLClassLoader.defineClass(Unknown Source)
>      at java.net.URLClassLoader.access$100(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 java.lang.ClassLoader.loadClass(Unknown Source)
>      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>      at java.lang.Class.forName0(Native Method)
>      at java.lang.Class.forName(Unknown Source)
>      at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
>      at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
>      at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
>      at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
>      at net.jini.loader.ClassLoading.loadClass(ClassLoading.java:138)
>      at
>     org.dancres.blitz.mangler.EntryMangler.unMangle(EntryMangler.java:92)
>      at org.dancres.blitz.remote.BlitzProxy.take(BlitzProxy.java:159)
>      at
>     org.ac.sql.rcode.client.RCodeClientPlugin.loop(RCodeClientPlugin.java:142)
>      at org.ip.yare.core.YAREplugin.run(YAREplugin.java:497)
>
>     My guess is that the RMIClassLoader cannot see the jini-core.jar
>     which is located in a plugin. I tried to set the classloader using
>     the following
>
>     Thread.currentThread ().setContextClassLoader (super.getManager
>     ().getPluginClassLoader (super.getDescriptor ()));
>
>     Doing so worked fine for the plugin that writes in the Javaspace but
>     when I try to take an entry from the space I get the above error.
>
>     Thanks in advance for any solutions
>
>     Christian Hager
>
> ===========================================================================
> 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
>

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