[jboss-user] [EJB 3.0] - Re: java.lan.ClassCastException when casting to remote bean
manemannen
do-not-reply at jboss.com
Thu Nov 20 02:52:00 EST 2008
Thanks for the replies!
Yes, I figured that it was the class loading issue after reading a bunch of other posts (before posting the original topic). Sadly, I do not know how to remedy the problem.
When I look in the unpacked war I can see the interfaces the simple-ejb.jar file and there is another one unpacked in the .ear directory, The interface is identical although defined in two places and as far as I understand loaded by different class loaders - which is the root problem.
I tried your suggestion Wolfgang but can't see how it would help (I got the same exception). The problem is still the same.
Object o = ctx.lookup("simpleserver/" + SimpleStatefulBean.class.getSimpleName() + "/remote");
| SimpleStatefulBeanRemote x = (SimpleStatefulBeanRemote) PortableRemoteObject.narrow(o, SimpleStatefulBeanRemote.class);
|
08:48:36,061 ERROR [STDERR] java.lang.ClassCastException
| 08:48:36,062 ERROR [STDERR] at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
| 08:48:36,062 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
|
Could you give me some pointers on how to proceed?
br
Magnus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190739#4190739
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190739
More information about the jboss-user
mailing list