Hi, thanks for your quick reply. Okay, I change to @Stateless @Startup @LocalBean @Remote(WMAuthEJB.class) public class WMAuthEJBImpl implements WMAuthEJB { }
and // @Stateless // @Singleton @Path("/") public class WMAuthService { /* @EJB private WMAuthEJB wmauth; */ @Inject private WMAuthEJBImpl wmauth; and the error has changed: SEVERE: error invoking org.apache.tomee.webservices.TomeeJaxRsService@23d29c10 java.lang.NoClassDefFoundError: LWMAuthEJBImpl; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2317) at java.lang.Class.getDeclaredFields(Class.java:1762) at org.apache.openejb.server.cxf.rs.Contexts.findContextFields(Contexts.java:53) at org.apache.openejb.server.cxf.rs.CdiResourceProvider.findContexts(CdiResourceProvider.java:131) at org.apache.openejb.server.cxf.rs.CdiResourceProvider.<init>(CdiResourceProvider.java:103) at org.apache.openejb.server.cxf.rs.OpenEJBPerRequestPojoResourceProvider.<init>(OpenEJBPerRequestPojoResourceProvider.java:28) at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication(CxfRsHttpListener.java:522) at org.apache.openejb.server.rest.RESTService.deployApplication(RESTService.java:464) at org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:275) at org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) CDI complains. Maybe the EAR in apps have a different JNDI context than the WAR in webapps? is it possible to browse the context? Thanks again. Cheers jolinnen -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/Using-EJB-from-an-EAR-app-inside-a-webservice-in-a-different-WAR-tp4678407p4678409.html Sent from the TomEE Users mailing list archive at Nabble.com.