[jboss-user] [Installation, Configuration & Deployment] - EntityContext ClassCastException when calling EJB 2.0 bean i

isotope1145 do-not-reply at jboss.com
Wed Nov 15 07:14:37 EST 2006

Using an EJB 3.0 stateless session bean I am unable to call EJB 2.0 entity beans across isolated .ears:
- I am running JBoss 4.0.4 
- I have two isolated ears: ejb3.ear is written to the EJB 3.0 spec, ejb2.ear which is a legacy ear written against the EJB 2.0 spec.
- A stateless session bean in ejb3.ear calls findByPrimaryKey on an entity bean in ejb2.ear.
- A ClassCastException occurs when I attempt to access the EntityContext in the ejb2.ear entity bean.  

Upon debugging the ejb2.ear entity bean, the EntityContext class loader url indicates that it was loaded by the ejb3.ear class loader.  This does not seem correct.

I have carefully followed the instructions in "Accessing EJBS in isolated ears" in 

Calls between EJB 3.0 beans across two isolated ears work fine.

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

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

More information about the jboss-user mailing list