Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2762

Injection of application-provided CDI bean into extension-provided bean fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 8.0.0.Final
    • 8.0.0.CR1
    • CDI / Weld
    • None

    Description

      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:

      WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default
      at injection point [UnbackedAnnotatedField] @Inject private org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validator

      A test case can be found here. To execute it, pull that branch and run:

      mvn clean install -pl integration -Dit.test=InjectionIssueIT
      

      The deployment of that Arquillian test fails with the error above.

      Attachments

        Activity

          People

            rhn-engineering-jharting Jozef Hartinger
            gunnar.morling Gunnar Morling
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: