JavaBeans (EJB) module does not have any enterprise beans configured

Itsik Mauyhas picture Itsik Mauyhas · Feb 19, 2017 · Viewed 11.8k times · Source

I am trying to deploy EAR file on WebShpere 8.5 and I keep getting this error:

com.ibm.ejs.container.EJBConfigurationException: The BackendBE.war Enterprise JavaBeans (EJB) module does not have any enterprise beans configured.

I add backendBE.war to the EAR project I want to install on my server, the error appears after trying to start the server.

Full error log:

com.ibm.ejs.container.EJBConfigurationException: The BackendBE.war Enterprise JavaBeans (EJB) module does not have any enterprise beans configured.
       at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule(AbstractEJBRuntime.java:605)
       at com.ibm.ws.ejbcontainer.runtime.SharedEJBRuntimeImpl.startModule(SharedEJBRuntimeImpl.java:336)
       at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3576)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1175)
       at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
       at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
       at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:774)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2182)
       at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
       at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
       at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
       at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
       at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994)
       at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:502)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)

If there is more code needed, please comment below.

Thanks.

Answer

Tracy picture Tracy · Feb 20, 2017

This exception occurs when a WAR module contains an ejb-jar.xml file that does not define any EJBs. When an ejb-jar.xml file is present, it must define at least one EJB, or there must be at least one EJB defined via annotations (like @Stateless) and the ejb-jar.xml and web.xml files must not container metadata-complete=true.