Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1943

Deployment fails with weld-servlet >= 2.2.5.Final because of duplicate CDI beans when deployment contains bean archive

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • tomcat_1.0.0.CR7
    • Tomcat Containers
    • None
    • Hide

      Unpack the arquillian-test.tar.xz attachment, then compile and run it using:

      $ mvn clean verify

      Show
      Unpack the arquillian-test.tar.xz attachment, then compile and run it using: $ mvn clean verify

    Description

      Using arquillian-tomcat-embedded-7, arquillian-bom 1.1.7.Final, WELD 2.2.10.Final:

      I have created a simple WAR file that contains WELD and a single servlet. There is also a dependent JAR that contains the following:

      • a @Dependent bean with a @Produces method
      • a META-INF/beans.xml file.

      When I try to test this servlet using Arquillian's TestNG container, the deployment fails with this error:

      SEVERE: Servlet threw load() exception
      org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type String with qualifiers @Trouble
      at injection point [BackedAnnotatedField] @Trouble @Inject private org.testing.web.TroubleServlet.trouble
      at org.testing.web.TroubleServlet.trouble(TroubleServlet.java:0)
      Possible dependencies:

      • Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()],
      • Producer Method [String] with qualifiers [@Trouble @Any] declared as [[BackedAnnotatedMethod] @Produces @Trouble org.testing.TroubleMaker.getTrouble()]

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chrisjr_jira Chris Rankin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: