[arquillian-issues] [JBoss JIRA] (ARQ-1943) Deployment fails because of duplicate CDI beans when beans inside a dependent JAR.

Chris Rankin (JIRA) issues at jboss.org
Thu Apr 16 19:00:21 EDT 2015


Chris Rankin created ARQ-1943:
---------------------------------

             Summary: Deployment fails because of duplicate CDI beans when beans inside a dependent JAR.
                 Key: ARQ-1943
                 URL: https://issues.jboss.org/browse/ARQ-1943
             Project: Arquillian
          Issue Type: Bug
          Components: Tomcat Containers
    Affects Versions: tomcat_1.0.0.CR7
         Environment: Windows 7 x64, Linux x64, JDK7
            Reporter: Chris Rankin
         Attachments: arquillian-test.tar.xz

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()]




--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the arquillian-issues mailing list