[jboss-user] [EJB 3.0] - Re: ClassCastException in the InvokeRemoteInterceptor

mindflyer do-not-reply at jboss.com
Sat Feb 3 07:01:27 EST 2007


Yes, I updated libs in the client classpath.

I investigated org.jboss.aspects.remoting.InvokeRemoteInterceptor and found out that in the line

org.jboss.aop.joinpoint.InvocationResponse response = (org.jboss.aop.joinpoint.InvocationResponse)client.invoke(invocation, null);

"client.invoke()" returns Exception if the server side has thrown Exception.

I replaced this line to:

Object result = client.invoke(invocation, null);
if ( result instanceof Throwable )  throw (Throwable) result;
org.jboss.aop.joinpoint.InvocationResponse response = (org.jboss.aop.joinpoint.InvocationResponse) result;

I'm not sure, that I did correctly, but it works :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4010387#4010387

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4010387



More information about the jboss-user mailing list