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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 06:32:39  来源:igfitidea点击:

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

javaejbwebsphere-8

提问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.warto the EARproject I want to install on my server, the error appears after trying to start the server.

我添加backendBE.warEAR我想在我的服务器上安装的项目,尝试启动服务器后出现错误。

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.xmlfile that does not define any EJBs. When an ejb-jar.xmlfile 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.xmland web.xmlfiles must not container metadata-complete=true.

当 WAR 模块包含ejb-jar.xml未定义任何 EJB的文件时,会发生此异常。当一个ejb-jar.xml文件存在时,它必须至少定义一个 EJB,或者必须至少有一个通过注释(如@Stateless)定义的 EJB并且ejb-jar.xmlweb.xml文件不能是 container metadata-complete=true