If one is using qualifiers that make use of binding members, a resolution error message like the following fails to adequately describe which qualifiers are involved:
Caused by: org.jboss.weld.exceptions.AmbiguousResolutionException:
WELD-001318: Cannot resolve an ambiguous dependency between:
- Producer Method [Optional] with qualifiers [@Claim @Claim @Claim] declared as [[UnbackedAnnotatedMethod] @Claim @Dependent @Produces org.eclipse.microprofile.jwt.wfswarm.cdi.CustomClaimProducer.genericOptionalClaimProducer(InjectionPoint)],
- Producer Method [Object] with qualifiers [@Claim @Claim @Claim] declared as [[UnbackedAnnotatedMethod] @Claim @Dependent @Produces org.eclipse.microprofile.jwt.wfswarm.cdi.CustomClaimProducer.genericClaimProducer(InjectionPoint)]
where Claim is:
In general, it would be good if the messages involving qualifiers that have binding members would print out the binding members to help with identifying the context that is involved.