Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1878

WELD-001409 Ambiguous dependencies for type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 2.2.4.Final
    • None
    • None
    • Hide

      Deploy the attached reproducer to JBoss EAP 6.x or WildFly

      Show
      Deploy the attached reproducer to JBoss EAP 6.x or WildFly
    • Workaround Exists
    • Hide

      Adding a qualifier to the injected instance works around this problem even though the qualifier is available on both web apps it doesn't seem to take in to account the one not being used.

      Show
      Adding a qualifier to the injected instance works around this problem even though the qualifier is available on both web apps it doesn't seem to take in to account the one not being used.

    Description

      Following scenario is starting without errors:

      having a library:
      library.jar
      Interface.java
      Producer.java //Producing an instance implementing Interface.java

      deploying an ear

      ear:
      war1.war
      lib
      library.jar
      classes
      Injector1.java // with @Inject Interface interface;

      war2.war
      lib
      library.jar
      classes
      Injector2.java // with @Inject Interface interface;

      ------------------------------------------------------

      What leads to an error is following scenario:

      library.jar
      Interface.java
      Producer.java //Producing an instance of HttpServletRequest

      deploying an ear

      ear:
      war1.war
      lib
      library.jar
      classes
      Injector1.java // with @Inject HttpServletRequest request;

      war2.war
      lib
      library.jar
      classes
      Injector2.java

      this setup is resulting in WELD-001409 Ambiguous dependencies for type [HttpServletRequest]

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-mus Mustafa Musaji
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: