Hi again, did anyone get a chance to look at this, if you need any further information, please let me know, any help appreciated.

regards,
Peter


On 01/21/2013 11:30 AM, Peter Lavin wrote:

Dear List,

My web application needs to deserialize both classes and objects which
are sent to it.

I'm using Base64 serialization, and when I transport full <name>.class
file to a service, I can deserialize it with no problem using
ObjectInputStream.readObject(). I also need to transport instances of
certain classes to the application but without having the benefit of
having the class loaded in the WebappClassLoader. Not surprisingly,
deserializing an instance of a class fails for ClassNotFoundException.

My question: When I need to transport an instance of a class, I can
easily also transport the full class. This full class can be
instantiated if required. How could I load this class to the
WebappClassLoader and have it available there for when I need to call
ois.readObject()? I want to load the (full) class to the WebClassLoader
to over come the ClassNotFoundException.

Env:
Tomcat 7.0.14
OSCentOS release 5.8 (Final)
java version 1.6.0 22
OpenJDK Runtime Environment (IcedTea6 1.10.10)
(rhel-1.28.1.10.10.el5 8-x86 64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

Any help appreciated,
regards,
Peter Lavin




--
with best regards,
Peter Lavin,
PhD Candidate,
CAG - Computer Architecture & Grid Research Group,
Lloyd Institute, 005,
Trinity College Dublin, Ireland.
+353 1 8961536

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to