Re: Unexpected return type from space.read()

Zsolt Kúti <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <20060628180000.27333197@tinca>
Well, here is my conlusion.

The reason for this failure was that my server's classpath contained
unnecessary jars from jini/lib. I purged out everything and put back
only those that was expected to cure the ClassNotFoundExceptions
reported at startup by my server.
I haven't checked which was in charge for it, only these were necessary:
checkconfigurationfile.jar
reggie.jar
outrigger.jar


But I still don't understand what was going on under the surface. That
is, how the internal use of EntryRep class in outrigger was affected by
the fact that my server (service) classpath contained it as well.


Thanks!
Zsolt


On Wed, 28 Jun 2006 09:39:58 +0200
Zsolt Kúti <[email protected]> wrote:

> Dear John,
> 
> On Tue, 27 Jun 2006 15:45:13 -0400
> "John McClain - Sun Microsystems, Inc." <[email protected]> wrote:
> 
> > My guess is there is some sort of classloading problem (which are
> > often puzzling....). In java two classes can be equal if and only if
> > they have the same name and they were loaded by the same
> > classloader. My guess is for some reason the EntryRep class that
> > was loaded for the object returned by space.read is being loaded by
> > a different class loader than the the classloader that loaded
> > outrigger's proxy.
> >
> > It would be helpful to know how you started outrigger (in particular
> > the config file used with start.jar and the java command line) and
> > how you started up outrigger's client (I guess this is the service
> > you wrote).
> 
> I guessed it has something to do with classpath. The fact that Browser
> could read my entries support this.
> 
> I used the out of box "launch-all" with one little modification. As a
> ClassServer is also started with it I added to its dir list mine, the
> place from where I intend to publish my xxx-dl.jars.
> 
> The probably problematic part how I start my application components.
> There is a little server that discovers registrars (the one launched
> by "launch-all") and register my service with it.
> 
> My service is who locate and works with the space (that is also
> launched by "launch-all"). Two of its methods do read/write to the
> space (I want to explore this scenario, not letting direct access
> "final" clients to space).
> 
> My client calls my service's methods and the service's read to space
> that fails, while the write is fine.
> 
> As server and client started from my IDE I checked settings and
> found the classes dir was in the classpath (no surprise, usually this
> default is appropriate, but certainly not now...). Now I changed that
> to use the jars I built based on examples in Newmarch's guide.
> 
> I'm going to revise these jars, they're in suspect, I guess.
> 
> Thanks for your help!
> Zsolt
> 
> ===========================================================================
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.