Try it with the RMI invoker adapter 
(bound at jmx/invoker/RMIAdaptor).
That does late unmarshalling of arguments
when the correct classloader is known.

Vanilla RMI is pretty bad at hot deployment and classloader
selection.

Regards,
Adrian

On Tue, 2003-12-09 at 14:03, Alexey Loubyansky wrote:
> I have an MBean with the following managed operation, where TestCommand 
> is an interface:
> public void test(TestCommand test) throws Exception
> {
> ...
> }
> 
> Remote client does:
> RMIAdaptor server = ...;
> server.invoke(
>     testerName,
>     "test",
>     new Object[]{command},
>     new String[]{TestCommand.class.getName()}
> );
> 
> The MBean and commands are deployed all together in the same SAR. First 
> deployment works fine but if the SAR is redeployed (even w/o 
> recompiling) the client fails.
> 
> It is HEAD. Am I missing something? Thanks.
> 
> Cause: java.lang.IllegalArgumentException: argument type mismatch
>       at 
> org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:122)
>       at 
> org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:76)
>       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
>       at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
>       at 
> org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:155)
>       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:544)
>       at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl.invoke(RMIAdaptorImpl.java:278)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
>       at sun.rmi.transport.Transport$1.run(Transport.java:148)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
>       at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
>       at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
>       at java.lang.Thread.run(Thread.java:536)
>       at 
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
>       at 
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
>       at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
>       at org.jboss.jmx.adaptor.rmi.RMIAdaptorImpl_Stub.invoke(Unknown Source)
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> JBoss-Development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
-- 
xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to