2014-03-06 60 views
0

部署獎勵-jsf應用程序時出現以下錯誤。請指教。jbpm6示例應用程序獎勵-jsf deplyment錯誤

07:18:41,768 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."rewards-jsf-6.0.1-SNAPSHOT.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."rewards-jsf-6.0.1-SNAPSHOT.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [UserGroupCallback] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.examples.util.RewardsApplicationScopedProducer.usergroupCallback]. Possible dependencies [[Managed Bean [class org.jbpm.examples.util.RewardsUserGroupCallback] with qualifiers [@Any @Default], Producer Method [UserGroupCallback] with qualifiers [@Any @Default] declared as [[method] @ApplicationScoped @Produces public org.jbpm.kie.services.cdi.producer.DefaultUserGroupInfoProducer.produceCallback()]]] 
    at org.jboss.as.weld.services.WeldService.start(WeldService.java:83) 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45] 
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45] 
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [UserGroupCallback] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.examples.util.RewardsApplicationScopedProducer.usergroupCallback]. Possible dependencies [[Managed Bean [class org.jbpm.examples.util.RewardsUserGroupCallback] with qualifiers [@Any @Default], Producer Method [UserGroupCallback] with qualifiers [@Any @Default] declared as [[method] @ApplicationScoped @Produces public org.jbpm.kie.services.cdi.producer.DefaultUserGroupInfoProducer.produceCallback()]]] 
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:278) 
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244) 
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107) 
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127) 
    at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346) 
    at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331) 
    at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366) 
    at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83) 
    at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) 
    ... 5 more 

回答

0

DefaultUserGroupInfoProducer應該已經被標記爲替代,因此需要在beans.xml中指定它來檢測它,是這種情況嗎?如果是這樣,從beans.xml中刪除它應該禁用它。

0

這是肯定的問題:org.jboss.weld.exceptions.DeploymentException:通過引起 類型[UserGroupCallback] WELD-001409曖昧的依賴關係:在需要的UserGroupCallBack 注射點 - > @注入專用的org.jbpm.examples.util.RewardsApplicationScopedProducer.usergroupCallback]。

1)第一可能的匹配: [[管Bean [類org.jbpm.examples.util.RewardsUserGroupCallback]與限定符[@Any @default],

2)第二匹配度:生產者方法[UserGroupCallback]限定符[@Any @Default]聲明爲[[method] @ApplicationScoped @Produces public org.jbpm.kie.services.cdi.producer.DefaultUserGroupInfoProducer.produceCallback()]]]

其中一個必須離開爲了工作。我想RewardsUserGroupCallback是這個應用程序的入口(我真的不知道這個應用程序託管在哪裏或它的內部),所以你需要查看代碼。