JBoss Community

JBoss AS 7.0.1 and EJB 3 lookup

created by Dmitry Paykin in EJB3 - View the full discussion

Hello,

I deploy my app as 2 separate deployments: EAR and WAR.

I put my EJB interfaces inside both WAR and JAR inside EAR.

When I trying to lookup EJB from WAR I recieve exception:

 

java.lang.ClassCastException: ruleEngine.api.ApplicationData$$$view12 cannot be cast to org.omg.CORBA.Object

          at org.jboss.com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:225) [jboss-rmi-api_1.0_spec-1.0.1.Final.jar:1.0.1.Final]

 

or simple ClassCastException when I just cast the class without narrowing.

 

The application worked fine in JBoss 6, only when I put property

properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");

to InitialContext. When I removed the property, I started to recieve the same error as on JB7.

 

Unfortunatelly, I can not create separate jar with interfaces, because of dependencies exist in the project. Because of the same problem I can not include EAR JAR in WAR's classpath.

 

Any help?

Reply to this message by going to Community

Start a new discussion in EJB3 at Community