[jboss-jira] [JBoss JIRA] (WFLY-2762) Injection of application-provided CDI bean into extension-provided bean fails

yangju (JIRA) issues at jboss.org
Wed Jan 22 17:38:28 EST 2014


    [ https://issues.jboss.org/browse/WFLY-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12938055#comment-12938055 ] 

yangju commented on WFLY-2762:
------------------------------

org.jboss.weld.nonPortableMode=true does not seem working anymore in CR1. I still got error:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type HttpServletRequest with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject private org.jboss.solder.servlet.http.CookieParamProducer.request
  at org.jboss.solder.servlet.http.CookieParamProducer.request(CookieParamProducer.java:0)
  Possible dependencies: 
  - WELD|AbstractSyntheticBean|epen-login-1.4.30-SNAPSHOT.war/WEB-INF/lib/solder-impl-3.2.0.Final.jar|HttpServletRequest,
  - Producer Method [HttpServletRequest] with qualifiers [@Any @Default] declared as [[BackedAnnotatedMethod] @Produces @Typed @RequestScoped protected org.jboss.solder.servlet.http.ImplicitHttpServletObjectsProducer.getHttpServletRequest()]

	at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:369)
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:282)
	at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:133)
	at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
	at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:507)
	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)
	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
                
> Injection of application-provided CDI bean into extension-provided bean fails
> -----------------------------------------------------------------------------
>
>                 Key: WFLY-2762
>                 URL: https://issues.jboss.org/browse/WFLY-2762
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: CDI / Weld
>    Affects Versions: 8.0.0.CR1
>            Reporter: Gunnar Morling
>            Assignee: Jozef Hartinger
>
> When an application provides a CDI bean, injection of this bean into another bean provided by a portable extension (which is attached to this application) fails.
> The specific use case is the PE for Hibernate Validator which contains a class {{ValidationInterceptor}} with an injection point of type {{j.v.Validator}}. If the application happens to provide a producer for that type, deployment of the application fails with the following error message:
> {quote}
> WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default
>     at injection point \[UnbackedAnnotatedField\] @Inject private org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validator
> {quote}
> A test case can be found [here|https://github.com/gunnarmorling/hibernate-validator/tree/injection-issue-test]. To execute it, pull that branch and run:
> {code}
> mvn clean install -pl integration -Dit.test=InjectionIssueIT
> {code}
> The deployment of that Arquillian test fails with the error above.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list