Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static nested classes in TCK lead to ambiguous CDI resolution errors #307

Closed
heiko-braun opened this issue Jan 11, 2018 · 3 comments · Fixed by #308
Closed

Static nested classes in TCK lead to ambiguous CDI resolution errors #307

heiko-braun opened this issue Jan 11, 2018 · 3 comments · Fixed by #308

Comments

@heiko-braun
Copy link

WELD-001409: Ambiguous dependencies for type ClassConverterBean with qualifiers @Default
--
at injection point [BackedAnnotatedField] @Inject private org.eclipse.microprofile.config.tck.ClassConverterTest.classConverterBean
at org.eclipse.microprofile.config.tck.ClassConverterTest.classConverterBean(ClassConverterTest.java:0)
Possible dependencies:
- Managed Bean [class org.eclipse.microprofile.config.tck.ClassConverterTest$ClassConverterBean] with qualifiers [@Any @Default],
- Managed Bean [class org.eclipse.microprofile.config.tck.ClassConverterTest$ClassConverterBean] with qualifiers [@Any @Default]
 

On both [1] and [2] the usage of static inner bean classes, that are added to WEB-INF/lib (see @Deployment) as well implicitly by arquillian, the TCK tests fail with an exception.

The most simple fix would be to turn these bean classes into regular classes, like in the other tests.

[1] https://github.com/eclipse/microprofile-config/blob/master/tck/src/main/java/org/eclipse/microprofile/config/tck/ClassConverterTest.java

[2] https://github.com/eclipse/microprofile-config/blob/master/tck/src/main/java/org/eclipse/microprofile/config/tck/ImplicitConverterTest.java

@mkouba
Copy link

mkouba commented Jan 11, 2018

Just for clarification:

@Emily-Jiang
Copy link
Member

@heiko-braun @mkouba will you be able to update your arquillian integration for Wildfly swarm to fix this?

@tevans78
Copy link
Contributor

tevans78 commented Jan 23, 2018

I opened an arquillian-core issue for a longer term solution: arquillian/arquillian-core#157
...and a PR for the short term fix #308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants