activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nguyen Kien Trung <>
Subject Same class but not equal ==
Date Tue, 01 Aug 2006 11:20:16 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
I've got a mysterious error...<br>
I'm using Lingo and ActiveMQ for remote method invocation.<br>
When receiving a RemoteInvocation object, Lingo uses reflection to
invoke method on proxy object which has been created earlier. But the
invocation throws NoSuchMethodException. I logged as much as I could
and found out:<br>
1) By introspecting the proxy object, it's confirmed that it contains
the required method for invocation<br>
2) The parameters retrieved from RemoteInvocation object (invocation)
by getParameterTypes() and from the proxy object by introspection are
similar in terms of <b>class type</b><br>
3) Interesting results<br>
<tt>&nbsp;&nbsp;&nbsp; log.debug("equal==? : " + (m.getParameterTypes()[0]
invocation.getParameterTypes()[0])); <b>// return false</b><br>
&nbsp;&nbsp;&nbsp; log.debug("equal? : " +
return false</b><br>
&nbsp;&nbsp;&nbsp; log.debug("equal class loader ==? : " +
(m.getParameterTypes()[0].getClassLoader() ==&nbsp;
invocation.getParameterTypes()[0].getClassLoader())); <b>// return
- m: of type java.lang.reflect.Method : method in the proxy object<br>
- invocation: of type : invocation
object received from ActiveMQ<br>
</tt>So, the issue here is: "Same class but not equal"<br>
Is there anything in marshalling and demarshalling process of ActiveMQ
that could lead to this problem?<br>
Appreciate for any advice<br>

View raw message