Hi, did you try it with the snapshot? that can be a classloading issue, ie the interface class shared is not the same (clearer: you lookup it from an app in the same server the impl is deployed but the interface is not in a shared loader)
*Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/4/7 skay <[email protected]> > Hi, > > I'm just trying to call a remote interface with sample code provided. > > > InitialContext ctx = new InitialContext(p); > Object > ref=ctx.lookup("java:global/securitypoc-engine/HelloWorldSessionBean"); > > HelloWorldSessionBeanRemote bean=(HelloWorldSessionBeanRemote)ref; > > Error caught : > > GRAVE: Servlet.service() for servlet [jsp] in context with path > [/securitypoc-ui] threw exception [java.lang.ClassCastException: $Proxy59 > cannot be cast to ch.skay.poc.ejb.HelloWorldSessionBeanRemote] with root > cause > java.lang.ClassCastException: $Proxy59 cannot be cast to > ch.skay.poc.ejb.HelloWorldSessionBeanRemote > > If I look inside debugger, I can notice that the reference is OK with a > StatelessEjbObjectHandler > > > proxy=ch.skay.poc.ejb.HelloWorldSessionBeanRemote;deployment=HelloWorldSessionBean;pk=null > > So everything seems Ok, except from the casting. > > Any idea ??? > > Please note that the sample code is running on Glassfish, JBoss AS7 and > Weblogic 12c. > Only TomEE is crashing with that error. > > > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Classcast-execption-on-proxy-when-looking-up-remote-interface-tp4662060.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
