My application structure is as follows:
1) I have a JAR file containing EJB interfaces. Lets call it EJBClient.jar.
It is placed in WEB-INF/lib directory of a web application.
2) I have another JAR of actual EJBs implementing above interfaces. This JAR is pacakged as an EAR and deployed on JBoss.
EAR name is echoejb.ear
3) JBoss prints JNDI names of registered EJBs on console.
4) Now, in servlet, I am using @EJB(lookup="lookup-string"), but I am getting following exception:
Can not set ejb.EchoBeanRemoteInterface field org.cts.servlet.WebServlet.remoteEcho1 to ejb.EchoBeanRemoteInterface$$$view6
What does this mean?
I tried looking up using InitialContext but same result
For look-up, I am using global namespace.
5) If EJB implementation jar is placed in the same web application, look-up is successful.