activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tillmann Wegst <t.we...@oxseed.com>
Subject Re: getObject ClassNotFound exception
Date Wed, 21 Sep 2011 16:15:25 GMT
Denis Baudin <dbaudin@...> writes:

> Hello,
> 
> I'm running ActiveMQ 1.5 on BEA Weblogic 8.1 and I ran into a
> classloader issue 
> (...)
> The solution was to create an anonymous class which extended
> ObjectInputStream (call it from getObject) inside ActiveMQObjectMessage
> and get the contextclassloader
> 
>     class ObjectInputStreamExt extends ObjectInputStream
>     {
>       ObjectInputStreamExt(InputStream is) throws IOException	
>       {		
>         super(is);  
>       }
>       protected Class resolveClass(ObjectStreamClass v) throws
> IOException, ClassNotFoundException
>       {
>         ClassLoader cl = Thread.currentThread().getContextClassLoader();
>         String name = v.getName();
>         return cl.loadClass(name);
>       }
>     }

Hello Denis, 

your solution sounds promising, but from what you wrote I fail to get 
how to implement this. 

Would you have the time to post the snippet of code that does what 
you've described? 

(I'm currently having the problem in an application running on 
Geronimo.) 

Regards, Tillmann 




Mime
View raw message