我正在尝试在WebShpere 8.5上部署EAR文件,并且我一直收到此错误:
com.ibm.ejs.container.EJBConfigurationException: The BackendBE.war Enterprise JavaBeans (EJB) module does not have any enterprise beans configured.
我将backendBE.war
添加到我要在服务器上安装的EAR
项目中,尝试启动服务器后出现错误。
完整错误日志:
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)
如果需要更多代码,请在下方发表评论。
感谢。
答案 0 :(得分:5)
当WAR模块包含未定义任何EJB的ejb-jar.xml
文件时,会发生此异常。当存在ejb-jar.xml
文件时,它必须至少定义一个EJB,或者必须至少有一个通过注释定义的EJB(如@Stateless
)和ejb-jar.xml
和{{1}文件不能是容器web.xml
。