quarkus
quarkus copied to clipboard
Camel Quarkus 2.12.0 incompatible with current main
Describe the bug
When running current main
together with Camel 2.12.0, we get:
Error: Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (build) on project kamelet: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
Error: [ERROR] [error]: Build step org.apache.camel.quarkus.core.deployment.InjectionPointsProcessor#injectedComponents threw an exception: java.lang.ClassCastException: class org.jboss.jandex.MethodParameterInfo cannot be cast to class org.jboss.jandex.Type (org.jboss.jandex.MethodParameterInfo and org.jboss.jandex.Type are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @2448d7d3)
Error: at org.apache.camel.quarkus.core.deployment.InjectionPointsProcessor.injectedComponents(InjectionPointsProcessor.java:130)
Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Error: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Error: at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
Error: at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
Error: at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
Error: at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
Error: at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
Error: at java.base/java.lang.Thread.run(Thread.java:829)
Error: at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Last Quarkus snapshot, that does not throw this error, was made of revision https://github.com/quarkusio/quarkus/commit/06944a5269aebe5a5b4900456356f15d41242895.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
- Build Quarkus
main
. - Run quarkus-test-suite
git clone [email protected]:quarkus-qe/quarkus-test-suite.git && cd quarkus-test-suite
mvn clean verify -pl kamelet
Output of uname -a
or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Yes, this is due to the Jandex upgrade. @Ladicek is there a way to support both for a while?
The MethodInfo.parameters()
method is the one most problematic, because I couldn't add a synthetic bridge method for binary compatibility :-/
In any case, if Camel Quarkus uses recent Quarkus and therefore Jandex 2.4.3, the recommendation would be to avoid calling the deprecated methods (MethodInfo.parameters()
-> MethodInfo.parameterTypes()
, ClassInfo.annotations()
-> ClassInfo.annotationsMap()
). Assuming there are no calls to Indexer
, this should be enough to let Camel Quarkus compile against Jandex 2.4.3 yet run against both Jandex 2.4.3 and Jandex 3.0.
CC @ppalaga / @lburgazzoli
/cc @Sanne, @aloubyansky, @geoand, @gsmet, @radcortez, @stuartwdouglas
This was caught in the quarkus-platform CI too. In general, we don't guarantee compatibility of specific platform member versions (e.g. CEQ 2.12.0) with core versions other than those they were released with as a platform. This is already fixed in 2.13.0, which will be included in quarkus-platform 2.13.0.Final. See https://github.com/quarkusio/quarkus-platform/pull/628
@aloubyansky I can confirm, that this works for 2.13.z, but at the same time the reproducer fails when running with current 999-SNAPSHOT(db531a327054fe7b69592c3192e023d30dd4157f at the time of writing)
How does it fail this time?
@aloubyansky the same error: https://github.com/quarkus-qe/quarkus-test-suite/actions/runs/3248450288/jobs/5330018583
Let's clarify the versions. The Quarkus main branch is currently targeting 2.14 but there hasn't been a release yet. There is Quarkus 2.13 branch from which we release 2.13 versions. Equivalent branches exist in the quarkus-platform project.
Which version of CEQ is being tested? If it's 2.13.X then in 2.14.X CEQ will need an adjustment to work with Quarkus 2.14.
I presume, that "CEQ" is Camel Quarkus, ie maven libraries, with "org.apache.camel.quarkus" group.
I also presume, that CEQ version is defined by version of imported org.apache.camel.quarkus:camel-quarkus-bom
Quarkus 2.13.0.Final and 2.13.2.Final works as expected with CEQ 2.13.0 Quarkus 999-SNAPSHOT(main branch, commit https://github.com/quarkusio/quarkus/commit/db531a327054fe7b69592c3192e023d30dd4157f) fails when working with CEQ 2.13.0
I can not Quarkus 999-SNAPSHOT with CEQ 2.14 since it is not available (which is not surprising :)
Correct, CEQ stands for Camel extensions for Quarkus.
Quarkus 2.14 isn't available neither. You could try building the CEQ main branch, similar to what is being done for Quarkus here.
Although, that won't work. They 'd need at least quarkus 2.14.0.cr1.
So, it looks like we either need to reopen this issue, or create a new one for quarkus-platform.
Also, does all this mean, that the same thing will happen with Quarkus 2.15 and CEQ 2.14?
So, it looks like we either need to reopen this issue, or create a new one for quarkus-platform.
It's already open https://github.com/quarkusio/quarkus/issues/8593
Also, does all thus mean, that the same thing will happen with Quarkus 2.15 and CEQ 2.14?
Yes, as mentioned previously, it's not guaranteed to work.
See a comment from James https://github.com/quarkusio/quarkus/issues/8593#issuecomment-1257584575