Hi,

I am trying to run stateless session bean example from javaee 7 example by
Arun Gupta. Which has ejb injected using @EJB annotation. When access the
TestServletWithInterface from the browser I am getting the following
exception. Same result even after adding mentioned system property.

/opt/jdk1.8.0_101/bin/java
-Djava.util.logging.config.file=/opt/apache-tomee-plume-7.0.1/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-javaagent:/opt/apache-tomee-plume-7.0.1/lib/openejb-javaagent.jar
-Djdk.tls.ephemeralDHKeySize=2048 -Xms1536M -Xmx1536M -XX:PermSize=256M
-Dtomee.serialization.class.whitelist=org.apache.openejb.BeanContext$BusinessRemoteHome
-classpath
/opt/apache-tomee-plume-7.0.1/bin/bootstrap.jar:/opt/apache-tomee-plume-7.0.1/bin/tomcat-juli.jar
-Dcatalina.base=/opt/apache-tomee-plume-7.0.1
-Dcatalina.home=/opt/apache-tomee-plume-7.0.1
-Djava.io.tmpdir=/opt/apache-tomee-plume-7.0.1/temp
org.apache.catalina.startup.Bootstrap start

Apache_Tomcat_(TomEE)_8.htm
<http://tomee-openejb.979440.n4.nabble.com/file/n4679941/Apache_Tomcat_%28TomEE%29_8.htm>
  


If I obtain the the ejb bean via initial context it works fine.
Properties p = new Properties();
                //p.put("java.naming.factory.initial",
"org.apache.openejb.client.LocalInitialContextFactory");
                p.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
                p.put("java.naming.provider.url", 
"http://localhost:8080/tomee/ejb";);
                InitialContext ctx = new InitialContext(p);
                Account myBean = (Account)
ctx.lookup("global/ejbstateless/AccountSessionBeanWithInterface!org.javaee7.ejb.stateless.remote.Account");

Do I need include any other configuration to work with @EJB?

Thanks,
Venkat




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/EJB-runtime-error-tp4679941.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to