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

[Quarkus 2.4.0] Messaging tests fail with ambiguous dependencies for org.apache.camel.quarkus.component.messaging.it.util.scheme.ComponentScheme #3173

Closed
jamesnetherton opened this issue Oct 11, 2021 · 8 comments · Fixed by quarkusio/quarkus#20734
Assignees
Milestone

Comments

@jamesnetherton
Copy link
Contributor

Maybe something changed recently in Quarkus that has started causing this error.

What confuses me is that the nightly Quarkus platform builds with 999-SNAPSHOT & CQ 2.3.0 are passing. I'd expect to see the same failure.

2021-10-11T03:31:18.4927883Z java.lang.RuntimeException: 
2021-10-11T03:31:18.4935938Z java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
2021-10-11T03:31:18.4948543Z 	[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: Found 14 deployment problems: 
2021-10-11T03:31:18.4960185Z [1] Ambiguous dependencies for type org.apache.camel.quarkus.component.messaging.it.util.scheme.ComponentScheme and qualifiers [@Default]
2021-10-11T03:31:18.4970629Z 	- java member: org.apache.camel.quarkus.component.messaging.it.MessagingCommonResource#componentScheme
2021-10-11T03:31:18.4989377Z 	- declared on CLASS bean [types=[org.apache.camel.quarkus.component.messaging.it.MessagingCommonResource, java.lang.Object], qualifiers=[@Default, @Any], target=org.apache.camel.quarkus.component.messaging.it.MessagingCommonResource]
2021-10-11T03:31:18.4994409Z 	- available beans:
2021-10-11T03:31:18.5106045Z 		- PRODUCER METHOD bean [types=[org.apache.camel.quarkus.component.messaging.it.util.scheme.ComponentScheme, java.lang.Object], qualifiers=[@Default, @Any], target=org.apache.camel.quarkus.component.messaging.it.util.scheme.ComponentScheme getMessagingComponentScheme(org.apache.camel.CamelContext camelContext), declaringBean=org.apache.camel.quarkus.component.messaging.it.util.scheme.MessagingComponentSchemeProducer]
2021-10-11T03:31:18.5142671Z 		- PRODUCER METHOD bean [types=[org.apache.camel.quarkus.component.messaging.it.util.scheme.ComponentScheme, java.lang.Object], qualifiers=[@Default, @Any], target=org.apache.camel.quarkus.component.messaging.it.util.scheme.ComponentScheme getMessagingComponentScheme(org.apache.camel.CamelContext camelContext), declaringBean=org.apache.camel.quarkus.component.messaging.it.util.scheme.MessagingComponentSchemeProducer]
@mkouba
Copy link
Contributor

mkouba commented Oct 12, 2021

I believe that a similar problem was fixed in quarkusio/quarkus#20582. Exactly what version of quarkus do you use?

@jamesnetherton
Copy link
Contributor Author

@mkouba It fails with 2.4.0.CR1 and the latest 999-SNAPSHOT. It was working fine in previous versions.

To replicate, the working branch of the 2.4.0 upgrade is here:

https://github.com/jamesnetherton/camel-quarkus/tree/quarkus-2.4.0.CR1

Build the project then change into integration-tests/jms-artemis-client and do mvn clean test.

@jamesnetherton
Copy link
Contributor Author

FWIW - I can probably work around this by removing the CDI producers + injection points and replacing it with something else.

Obviously that's not ideal, as there'd still potentially be some issue in Quarkus left unresolved.

@aloubyansky
Copy link
Contributor

It may be related to my bootstrap refactoring PR. I'll check whether it's a regression.

@mkouba
Copy link
Contributor

mkouba commented Oct 13, 2021

Hm, so I built the project with -Denforcer.skip and got [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (antora-xref-check) on project camel-quarkus-docs but still I was able to run the tests for jms-artemis-client and from the debug log I can see that the bean classes, e.g. org.apache.camel.quarkus.component.messaging.it.util.scheme.MessagingComponentSchemeProducer, are found twice in the bean archive index. Which could mean that an ApplicationArchive is built twice from a dependency or there are two dependencies that contain the given class.

@aloubyansky
Copy link
Contributor

I am building it now.

@aloubyansky
Copy link
Contributor

I know what the problem is, this is mine.

@jamesnetherton
Copy link
Contributor Author

Verified as fixed in #3210.

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.

3 participants