jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerome.pic...@mpsa.com
Subject Réf. : RE: UnmarshalException with Remote Cache
Date Fri, 25 Jun 2004 08:06:25 GMT




It's work.

I have JARing my client classes  and adding the jar to the classpath of the
RemoteCache.

Thanks you very much.



                                                                           
             Travis Savo                                                   
             <tsavo@IFILM.com                                              
             >                                                        Pour 
                                       'Turbine JCS Users List'            
             24/06/2004 20:38          <turbine-jcs-user@jakarta.apache.or 
                                       g>                                  
                                                                        cc 
                 Veuillez                                                  
                répondre à                                           Objet 
               Turbine JCS             RE: UnmarshalException with Remote  
                Users List             Cache                               
             <turbine-jcs-use                                              
             r@jakarta.apache                                              
                  .org>                                                    
                                                                           
                                                                           
                                                                           




This is your classic "I don't know what class you mean, and I don't know
how
to get it" problem you'll see anywhere when moving objects over the wire.

With RMI, the problem is solved for you IF AND ONLY IF you have an RMI
security manager installed AND you have your java.security permissions set
up correctly. The class definition will be dynamically loaded over the
wire.

Assuming your not using RMI (like with LateralCache), or you don't have an
RMI security manager installed, or your not able to relax your permissions
(as is covered in my RemoteCache HOWTO), or you just want it to work
without
worrying about any of the above, it's absolutely vital that ALL JVM's
involved have access to the objects in question (namely
inet.psa.domaine.User). That is to say the classes in question must be in
your classpath. This is usually accomplished by JARing your client classes
up, and adding the JAR to the classpath of the RemoteCache instance when
starting it, or just simply adding the path of your classes to the
classpath
of RemoteCache when starting it. Of course the problem with this is any
time
your classes change, you'll need to deploy them to both your client and
your
RemoteCache, and destroy any disk caches left on disk (which will have old
versions of the classes in them).

I personally (used to) have my ant task do this. It would:

Check out my client project.
Compile the classes that would be used with JCS (com.ifilm.persistent.* in
my scenario, inet.psa.domaine.User and all others in yours).
JAR said classes (com.ifilm.persistent.* -> ifilmpersistent.jar).
Check out JCS.
Compile JCS.
Copy the ifilmpersistent.jar from the prior step into the JCS lib dir.
Start RemoteCache, being sure to include lib/ifilmpersistent.jar in the
classpath.

Now I've relaxed my permissions enough to where this isn't necessary (see
my
RemoteCache HOWTO), but this solution worked for me for a long time.

Let me know if you need further assistance with this.

-Travis Savo <tsavo@ifilm.com>


-----Original Message-----
From: jerome.picard@mpsa.com [mailto:jerome.picard@mpsa.com]
Sent: Thursday, June 24, 2004 9:01 AM
To: Turbine JCS Users List
Subject: UnmarshalException with Remote Cache






Hello,

I try to use the Remote Cache (RMI) for another test.

When I put "String" object in one of the Local cache, all works.
But when I put another object (inet.psa.domaine.User) which is
serializable, I obtain this exception in the local cache :

 GRAVE: java.rmi.ServerException: RemoteException occurred in server
thread; nested exception is:
     java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
     java.lang.ClassNotFoundException: inet.psa.domaine.User

Have you an idea ?

Thanks for your answers.




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org


Mime
View raw message