Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-25 Thread Peter Lavin
Hi again Chris, comments below On 01/24/2013 07:05 PM, Christopher Schultz wrote: What if you try this: ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); FileClassLoader cl = new FileClassLoader(contextClassLoader); Class? spClass = cl.arrayToClass(null,

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-24 Thread Peter Lavin
Hi again Christopher, thanks for your note and interest, some more details inline... On 01/23/2013 07:39 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- ObjectInputStream should be using the context class loader of the thread which should be the WebappClassLoader. Can you

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peter, On 1/24/13 4:27 AM, Peter Lavin wrote: java.lang.ClassNotFoundException: common.core.providers.HelloWorldSP at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676) at

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-24 Thread Peter Lavin
hi Chris, some more details, I'd left out a line in my code snippet this morning, On 01/24/2013 05:33 PM, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peter, On 1/24/13 4:27 AM, Peter Lavin wrote: After calling: ClassLoader contextClassLoader =

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peter, On 1/24/13 1:01 PM, Peter Lavin wrote: ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); // this line was missing in earlier note //this calls the class below FileClassLoader cl = new

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-23 Thread Peter Lavin
Solution and root of problem: My application was using ObjectInputStream (OIS) to convert a serialized instance of an object. OIS uses a different class loader, one which does not have visibility of the classes loaded in the WebappClassLoader. This was giving a ClassNotFoundException. Then

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peter, On 1/22/13 2:16 PM, Peter Lavin wrote: I've spent some time on this today and have found (at least I think so) that my problem in deserializing an instance of an object is related to the ClassLoader that the class ObjectInputStream uses.

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Peterm,, On 1/23/13 9:29 AM, Peter Lavin wrote: My application was using ObjectInputStream (OIS) to convert a serialized instance of an object. OIS uses a different class loader, one which does not have visibility of the classes loaded in the

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-22 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 1/21/13 3:35 PM, Mark Thomas wrote: On 21/01/2013 20:30, Konstantin Kolinko wrote: 2013/1/21 Peter Lavin lav...@cs.tcd.ie: Dear List, My web application needs to deserialize both classes and objects which are sent to it. I'm

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-22 Thread Mark Thomas
On 22/01/2013 14:49, Christopher Schultz wrote: Mark, On 1/21/13 3:35 PM, Mark Thomas wrote: On 21/01/2013 20:30, Konstantin Kolinko wrote: The same as with any other ClassLoader: use the bytes and call ClassLoader.defineClass(..), then ClassLoader.resolveClass(..). No can do. That

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-22 Thread Peter Lavin
Hi again, I've spent some time on this today and have found (at least I think so) that my problem in deserializing an instance of an object is related to the ClassLoader that the class ObjectInputStream uses. It appears that it does not use the WebappClassLoader of the service in question,

Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-21 Thread Peter Lavin
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

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-21 Thread Peter Lavin
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.

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-21 Thread Konstantin Kolinko
2013/1/21 Peter Lavin lav...@cs.tcd.ie: 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

Re: Loading a DeSerialized Class to WebabbClassLoader Question

2013-01-21 Thread Mark Thomas
On 21/01/2013 20:30, Konstantin Kolinko wrote: 2013/1/21 Peter Lavin lav...@cs.tcd.ie: 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