You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "jason zhang (JIRA)" <ji...@apache.org> on 2014/06/14 00:16:02 UTC

[jira] [Created] (DELTASPIKE-643) Ambiguous dependencies for type BoundRequestContext when weld context controller under WELD, Jersey, and Tomcat

jason zhang created DELTASPIKE-643:
--------------------------------------

             Summary: Ambiguous dependencies for type BoundRequestContext when weld context controller  under WELD, Jersey, and Tomcat
                 Key: DELTASPIKE-643
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-643
             Project: DeltaSpike
          Issue Type: Bug
          Components: CdiControl
    Affects Versions: 0.7
         Environment: Apache Jersey 2.9, WELD  2.1.2, 
            Reporter: jason zhang
            Priority: Critical


My server is tomcat 7x, WELD 2.1.2 for CDI, To support CDI injection for Jersey Resource class, I added jersey-gf-cdi. Once jersey-gf-cdi is added, I can not use weld context controller anymore. 

I got this error
{code}
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type BoundRequestContext with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject private org.apache.deltaspike.cdise.weld.ContextController.requestContext
  at org.apache.deltaspike.cdise.weld.ContextController.requestContext(ContextController.java:0)
  Possible dependencies: 
  - WELD%AbstractSyntheticBean%flat%BoundRequestContext,
  - org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider$Hk2Bean@1af9196

	at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378)
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:291)
	at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:165)
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:529)
	at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
	at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
{code}

I have a very simple maven project to reproduce this: https://github.com/jasonzhang2022/cidctrl

This error also occurs for Deltaspike 05, and 0.6.

Thanks




--
This message was sent by Atlassian JIRA
(v6.2#6252)