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

Ambiguous dependencies when only one correct dependency exists

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.6.Final, 2.0.0.Alpha2
    • 1.1.1.Final, 1.1.4.Final
    • Resolution
    • None

      Running attached application gives the error:

      WELD-001409 Ambiguous dependencies for type [Interface1<UUID, String>] with qualifiers [@Default] at injection point [[field] @Inject private test.Bean.dependency]. Possible dependencies [[Managed Bean [class test.ConcreteClass1] with qualifiers [@Any @Default], Managed Bean [class test.ConcreteClass2] with qualifiers [@Any @Default], Managed Bean [class test.ConcreteClass3] with qualifiers [@Any @Default]]]

      But only ConcreteClass3 has required type of Interface1<UUID, String>

      When ConcreteClass1 and ConcreteClass2 extens AbstractClass1 instead of AbstractClass2 everything works as expected.

              ajustin@redhat.com Ales Justin
              titmus Sebastian Graca (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: