Wildfly - 10.x - WELD-001414:Bean名称含糊不清。名称csfFLOWDISCOVERYCDIHELPER解析为bean

时间:2017-04-27 03:47:47

标签: java jsf jsf-2 wildfly-10

  • 服务器 - WildFly - 10.1.0
  • JSF版本 - 2.2
  • Primefaces - 5.0

我正在尝试在.war服务器中部署WildFly 10.1.0文件。之前我在JBoss 7.1运行它,我们让它工作正常。但是现在当我尝试在WildFly服务器中部署应用程序时,我遇到了导致部署失败的异常集。

09:05:02,630 SEVERE [javax.enterprise.resource.webcontainer.jsf.application.view] (MSC service thread 1-3) Unable to obtain CDI 1.1 utilities for Mojarra
09:05:02,650 SEVERE [javax.enterprise.resource.webcontainer.jsf.flow] (MSC service thread 1-3) Unable to obtain CDI 1.1 utilities for Mojarra
09:05:02,897 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."MyApplication.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyApplication.war".WeldStartService: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name csfFLOWDISCOVERYCDIHELPER resolves to beans:
  - Managed Bean [class com.sun.faces.flow.FlowDiscoveryCDIHelper] with qualifiers [@Default @Named @Any],
  - Managed Bean [class com.sun.faces.flow.FlowDiscoveryCDIHelper] with qualifiers [@Default @Named @Any]
        at org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:134)
        at org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:130)
        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
        at org.jboss.threads.JBossThread.run(JBossThread.java:320)

09:05:02,971 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "MyApplication.war")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"MyApplication.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"MyApplication.war\".WeldStartService: Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name csfFLOWDISCOVERYCDIHELPER resolves to beans:
  - Managed Bean [class com.sun.faces.flow.FlowDiscoveryCDIHelper] with qualifiers [@Default @Named @Any],
  - Managed Bean [class com.sun.faces.flow.FlowDiscoveryCDIHelper] with qualifiers [@Default @Named @Any]"},
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"MyApplication.war\".WeldStartService"],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
09:05:03,041 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "MyApplication.war" (runtime-name : "MyApplication.war")
09:05:03,068 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."MyApplication.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyApplication.war".WeldStartService: Failed to start service

我并没有真正得到这个异常指向的地方。错误也不清楚。我找到了关于此错误的其他SO帖子,但那些是GlassFish服务器。有没有人遇到类似的问题,并解决了这个问题。如果有人指出我正确的方向或有任何解决办法,我会非常感激。

1 个答案:

答案 0 :(得分:2)

应用程序中的jsf-api和jsf-impl jar版本与应用程序服务器实现的版本不同会导致此问题。从WEB-INF / lib文件夹中删除应用程序提供的jar并使用提供的服务器解决了问题。