[jboss-user] [EJB/JBoss] - Lookup EJB 3 + ClassCastException ( jboss-4.2.2.GA )

pedro.neves do-not-reply at jboss.com
Wed Feb 20 08:05:59 EST 2008


I have two .ears, one .ear with ejbs and other .ear with web.
To locate a ejb in ear the web are experiencing a mistake  "ClassCastException"

I find the ejb perfect, but to instance of StatelessLocalProxy and not do the casting for the interface of EJB

Exception:
Caused by: java.lang.ClassCastException: $Proxy142
	
Code:
	
	InitialContext ic = new InitialContext();
	IMyEJBTest ejb = (IMyEJBTest)ic.lookup( ejbName );
	
	
Note: In one .ear only is not the error.

helpe-me

Pedro Neves
Brazil

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

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



More information about the jboss-user mailing list