[jboss-user] [EJB 3.0] - Classcastexception when accessing EJB3.0 JPA EJB
forumer
do-not-reply at jboss.com
Wed Sep 27 18:32:08 EDT 2006
Using JBoss4.0.4
This is the first time I am trying to deploy a bean using EJB3.0/JPA. I get the following error. I'd appreciate any help me in getting me going with using JPA.
java.lang.ClassCastException: $Proxy162
My Bean is annotated as:
@Stateless
| @RemoteBinding(jndiBinding="ABC/FMBean/remote")
| public class FMABean implements FMALocal, FMARemote {
| @PersistenceContext(unitName="FM")
| protected EntityManager em ;
|
In the JSP I am trying to access the bean as:
InitialContext ctx = new InitialContext();
| Object obj = ctx.lookup("ABC/FMAAdminBean/remote");
| System.out.println("obj class ="+obj.getClass());
| fmaAdmin = (FMAAdminBean) obj;
JNDIView in JMX Console look like:
| +- ABC (class: org.jnp.interfaces.NamingContext)
| | +- FMABean (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy147 implements No ClassLoaders found for: com.boeing.begss.fm.FMARemote (no security manager: RMI class loader disabled))
| | +- FMAAdminBean (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy144 implements No ClassLoaders found for: com.boeing.begss.fm.FMAAdminRemote (no security manager: RMI class loader disabled))
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974699#3974699
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974699
More information about the jboss-user
mailing list