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

mindflyer do-not-reply at jboss.com
Fri Feb 2 10:10:30 EST 2007


Client application lookups SLSB in the JNDI and invokes its method. If SLSB throws exception (in this example - DAOException),  I see on the client side ClassCastException.

Caused by: java.lang.ClassCastException: net.uk.topdog.td2.common.dao.DAOException
	at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
	at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
	at $Proxy4.executeCommands(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.uk.topdog.td2.common.jndi.RemoteProxy.invokeRemote(RemoteProxy.java:75)
	at net.uk.topdog.td2.common.jndi.RemoteProxy.invoke(RemoteProxy.java:40)
	at $Proxy4.executeCommands(Unknown Source)
	at net.uk.topdog.td2.common.dao.client.ClientUnTypedDAOImpl.executeCommands(ClientUnTypedDAOImpl.java:173)
	... 12 more

I saw ClassCastException for EJBException also.
And ClassCastException for NotFoundInDispatcherException if I used clustered SLSB.

My SessionBean :

@Stateless(name = "UnTypedEmfDAORemoteSessionBean")
@Remote(UnTypedEmfSerializableDAO.class)
@Interceptors({EmfPreparerForSerialization.class})
public class UnTypedEmfDAORemoteSessionBean implements UnTypedEmfSerializableDAO { ... }

I use JBoss 4.0.5.GA with jboss-EJB-3.0_RC9_Patch_1 now.
Earlier I used JBoss 4.0.4.GA with EJB 3.0 RC7 and didn't see ClassCastException.

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

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



More information about the jboss-user mailing list