java JavaBeans (EJB) 模块没有配置任何企业 bean
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42325385/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JavaBeans (EJB) module does not have any enterprise beans configured
提问by Itsik Mauyhas
I am trying to deploy EAR file on WebShpere 8.5 and I keep getting this error:
我正在尝试在 WebShpere 8.5 上部署 EAR 文件,但我不断收到此错误:
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.
我添加backendBE.war
到EAR
我想在我的服务器上安装的项目,尝试启动服务器后出现错误。
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.access0(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.
谢谢。
回答by Tracy
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
.
当 WAR 模块包含ejb-jar.xml
未定义任何 EJB的文件时,会发生此异常。当一个ejb-jar.xml
文件存在时,它必须至少定义一个 EJB,或者必须至少有一个通过注释(如@Stateless
)定义的 EJB并且ejb-jar.xml
和web.xml
文件不能是 container metadata-complete=true
。