2017-02-19 87 views
1

我想對Webshpere的8.5部署EAR文件,我不斷收到此錯誤:的JavaBeans(EJB)模塊沒有任何企業bean配置

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

我添加backendBE.warEAR項目,我想安裝在我的服務器上,嘗試啓動服務器後出現錯誤。

完整的錯誤日誌:

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) 

如果需要更多的代碼,請評論如下。

謝謝。

回答

4

當WAR模塊包含未定義任何EJB的ejb-jar.xml文件時,會發生此異常。當存在ejb-jar.xml文件時,它必須定義至少一個EJB,或者必須至少有一個通過註釋定義的EJB(如@Stateless),並且ejb-jar.xmlweb.xml文件不得包含容器metadata-complete=true