You right.
Here is the content of DoGet of my Servlet
Properties p = new Properties();
p.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
p.put("java.naming.provider.url",
"http://127.0.0.1:8080/tomee/ejb"); //
user and pass optional
p.put("java.naming.security.principal", "both");
p.put("java.naming.security.credentials", "tomcat");
InitialContext ctx = null;
try {
ctx = new InitialContext(p);
} catch (NamingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
MyEjbRemote mBean =null;
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
cl.loadClass("org.apache.openejb.client.EJBObjectProxy");
mBean = (MyEjbRemote) ctx.lookup("MyEjbRemote");
} catch (NamingException | ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return mBean;
This code fails with abovementioned exception.
I am using last distribution of Tomcat7 as a client and last release of
Tomee as a server.
I added jar to tomcat/lib and it is still the same issue.
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/Cant-invite-EJB-from-another-Tomcat-tp4672650p4672658.html
Sent from the TomEE Dev mailing list archive at Nabble.com.