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

Ambiguous dependencies when only one correct dependency exists

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                alesj AleŇ° Justin
                Reporter:
                titmus Sebastian Graca
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: