我在WildFly-13.0.0.Final中部署我的EAR应用程序时遇到问题(到目前为止在WildFly-10.1.0.Final中正常工作)。
情况如下:我在一个模块中有一个public interface FileStreamHelper
。实现在另一个模块中,看起来像这样
@EJB(name = "java:/ejb/FileStreamHelperBean", beanInterface = FileStreamHelper.class)
public class DocumentStreamHelperBean implements FileStreamHelper {
[...] }
尝试部署我的应用程序时,出现以下错误:
2018-06-15 15:06:36,360 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.subunit."ws-app-7.0.0-71219-SNAPSHOT.ear"."mip-util.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ws-app-7.0.0-71219-SNAPSHOT.ear"."mip-util.jar".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of subdeployment "fs-util.jar" of deployment "ws-app-7.0.0-71219-SNAPSHOT.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:150)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1364)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0406: No EJB found with interface of type 'x.y.z.FileStreamHelper' for binding java:/ejb/FileStreamHelperBean
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:90)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:274)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:185)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
如前所述,绝对 SAME 应用程序适用于较旧的WildFly版本。在WildFly-9.0.2.Final中,我不得不禁用Weld以使其运行,配置是在部署中使用文件jboss-all.xml
并使用内容:
<jboss xmlns="urn:jboss:1.0">
<weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
</jboss>
在9.0.2之后不再需要了。为当前问题再次添加此文件不会改变任何内容。
目前使用Java v1.8.0u171
和WildFly v13.0.0.Final
。
非常感谢任何帮助。