Closed lorenzobenvenuti closed 1 year ago
As a workaround try: --initialize-at-run-time=oracle.jdbc.driver.OracleDriver
.
It did the trick, thank you very much! I tried oracle.jdbc.datasource.impl.OracleDataSource
efore but I didn't think to try with the driver class too. Thanks!
@Sanne can you see a better mitigation by any chance?
Interesting, thanks for pinging me.
The workaround seems to fly directly against our expectations, so it might have problematic side effects on other components:
The error seems to suggest the MBeans have been initialized; we make sure the MBean registration code is disabled:
But such substitutions only apply to after-compilation to native. I suspect what is happening is that some other component is aggressively initializing the class - I guess triggered by that aactivemq extension? I'll try to debug the reproducer, thanks!
We are seeing a similar issue, but we are using camel-quarkus-jms
. Could this have the same cause?
@turing85 Do you have any re-producer with camel-quarkus-jms
?
@zhfeng none that I can share easily. Haven't check yet if I can reproduce it with a MRE. This week is packed, so I will not be able to create the MRE. Maybe on the weekend or at the beginning of next week.
@turing85 no problem. I tried with the orignal reproducer of this issue above. And it only failed with camel-quarkus-activemq
but not camel-quarkus-jms
.
@zhfeng You could try to activate XA
on the connection. I know that my use-case uses XA
.
Thanks @turing85 - now I can reproduce the issue by using quarkus-artemis
and quarkus-pooled-jms
. And if I removes quarkus-pooled-jms
, it works again. I will take a look.
Hmm, it is intersting that both of them camel-quarkus-activemq
and quarkus-pooled-jms
depend on org.apache.commons:commons-pool2
which seems that the poolConfig has JmxEnable property.
@lorenzobenvenuti can you review https://github.com/apache/camel-quarkus/pull/4287 ? I tried with your original re-producer and it works locally with this fix.
Hi,
I noticed that native build fails if a project is using both
camel-quarkus-activemq
andquarkus-jdbc-oracle
. The issue looks similar to this:quarkus-jdbc-oracle
orcamel-quarkus-activemq
, native build workscamel-quarkus-file
) solves the issue.--initialize-at-run-time=oracle.jdbc.datasource.impl.OracleDataSource
doesn't have any effectThe error I see is non-deterministic (probably the build is multi-threaded and Graalvm returns the first error?): sometimes it returns
while sometimes it returns
The issue happens with Quarkus 2.11.1.Final, I didn't try with other versions.
I've reproduced the bug here: https://github.com/lorenzobenvenuti/quarkus-amq-oracle-native-image-error
mvn package -Pnative
will fail formain
; if we use a different component for the consumer (camel-file
branch is usingcamel-quarkus-file
) then the build is successful.Thanks,
lorenzo