Re: ClassCastException on MessageObject's object

2007-04-30 Thread nlif
James, We assume that the class is loaded when ActiveMQObjectMessage.getObject() is called, and the de-serialization takes place. Is this correct? Now, after looking at the code, it seems that the class loader is resolved in ClassLoadingAwareObjectInputStream. Is this correct? What can cause it t

Re: ClassCastException on MessageObject's object

2007-04-30 Thread nlif
Thanks, Christopher, No, it's not. The broker and the consumer are on two different machines. The transport is TCP. We use Jencks for the consumer. We're currently on ActiveMQ 4.1, but we had this problem on 4.0 as well. Naaman Christopher G. Stach II wrote: > > nlif wrote: >> Thanks, James.

Re: ClassCastException on MessageObject's object

2007-04-30 Thread Christopher G. Stach II
nlif wrote: > Thanks, James. > > Yes, I'm also inclined to think it's a class loader issue. But then, how > come it doesn't happen all the time? > What may cause it to load another version of the class only some of the > times? > Does ActiveMQ do anything... um, unconventional with class-loading?

Re: ClassCastException on MessageObject's object

2007-04-30 Thread nlif
Thanks, James. Yes, I'm also inclined to think it's a class loader issue. But then, how come it doesn't happen all the time? What may cause it to load another version of the class only some of the times? Does ActiveMQ do anything... um, unconventional with class-loading? Thanks, Naaman James.S

Re: ClassCastException on MessageObject's object

2007-04-30 Thread James Strachan
If you get a ClassCastException yet the object seems to be of the correct class name, then it looks like a class loader issue (multiple versions of the same class on the classpath). Otherwise if it was a serialization issue, you wouldn't get an object you can inspect. On 4/30/07, nlif <[EMAIL PR

ClassCastException on MessageObject's object

2007-04-30 Thread nlif
Hi all, We have a strange problem, maybe someone has seen this or has an idea: In our MessageListener, we cast the Message into ObejctMessage, and then call getObject() to get the actual object we sent. Upon trying to cast the object to the proper class (SendMobileNotification), we get a ClassCa