Are you sure that the "body" of the ObjectMessage is not null? instanceof
returns false if object is null.
Other than that, I would suggest you debug the app with a breakpoint on this
line and then run a few quick eval expressions to see why this check is
returning false.
Sanjiv
On 7/15/06, Nguyen Kien Trung <[EMAIL PROTECTED]> wrote:
Thanks James,
I've printed out the classloader of the body object, classloader of each
and every parent classes, classloader of the current RemoteInvocation
itself...
It resulted the same classloader.
Any other suggestion? Could it be of configuration problems?
Cheers,
Trung
Friday, July 14, 2006, 5:57:55 PM, you wrote:
> It sounds like a classloader issue to me - I think you might have
> multiple instances of the RemoteInvocation on the classloader maybe?
> On 7/14/06, Nguyen Kien Trung <[EMAIL PROTECTED]> wrote:
>> Hi all,
>> I'm trying to use ActiveMQ in Lingo and have encountered a problem:
>> [DefaultMashaller] Invalid message will be discarded:
>> ActiveMQObjectMessage {.....}
>> I've gone through the flow and found that the exception is thrown in
>> DefaultMashaller.readRemoteInvocation() when a body of the message is
>> not of type org.springframework.remoting.support.RemoteInvocation
>> However, I logged the body object of the message and recursively
printed
>> out the parent classes. Ooops, RemoteInvocation is one of body's
>> parents. It's obivous since the message body is of type LingoMessage,
>> and LingoMessage extends RemoteInvocation...
>> How does the IF not work?
>> -------------------------------
>> if (body instanceof RemoteInvocation) {
>> return (RemoteInvocation) body;
>> }
>> -------------------------------
>> I'm using Spring 2.0RC1 in the application whereas Lingo uses Spring
>> 1.2.6 in its implementation. Not sure if it's the root cause? - I've
>> looked at the REMOTING package source code in both Spring versions and
>> found few changes but not critical. RemoteInvocation classes are
identical.
>> I appreciate any help...
>> Trung
--
Best regards,
Nguyen mailto:[EMAIL PROTECTED]