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

Native: build error when an app use DB2 (quarkus-jdbc-db2) and Oracle (quarkus-jdbc-oracle) #30176

Closed
pjgg opened this issue Jan 4, 2023 · 2 comments · Fixed by #28921
Closed
Labels
area/mandrel area/persistence OBSOLETE, DO NOT USE kind/bug Something isn't working
Milestone

Comments

@pjgg
Copy link
Contributor

pjgg commented Jan 4, 2023

Describe the bug

Quarkus Version: 999-SNAPSHOT
Works as expected with Quarkus 2.15.0.Final

A native compilation with quay.io/quarkus/ubi-quarkus-mandrel:22.3-java17 is failing, when an application has the following extensions:

  • quarkus-jdbc-oracle
  • quarkus-jdbc-db2

Error:

[ERROR]   DB2DatabaseIT Failed to build Quarkus artifacts. Caused by java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: io.quarkus.deployment.pkg.steps.NativeImageBuildStep$ImageGenerationFailureException: Image generation failed. Exit code: 1
        at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.imageGenerationFailed(NativeImageBuildStep.java:421)
        at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:262)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

There is a warning message that looks very interesting:

16:21:37,142 INFO  JBoss Threads version 3.4.3.Final
16:21:37,152 WARN  The following extensions have required native-image to allow run-time resolution of classes: {quarkus-jdbc-oracle}. This is a global requirement which might have unexpected effects on other extensions as well, and is a hint of the library needing some additional refactoring to better support GraalVM native-image. In the case of 3rd party dependencies and/or proprietary code there is not much we can do - please ask for support to your library vendor. If you incur in any problem with other Quarkus extensions, please try reproducing the problem without these extensions first.

Could be related to: #28921

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

git clone git@github.com:quarkus-qe/quarkus-test-suite.git

cd quarkus-test-suite/sql-db/sql-app

mvn clean verify -Dnative -Dit.test=DB2DatabaseIT

Works with Quarkus 2.15.0.Final
mvn clean verify -Dnative -Dit.test=DB2DatabaseIT -Dquarkus.platform.version=2.15.0.Final

Note: be sure that the scenario is not disabled in native mode

Output of uname -a or ver

Linux fedora 6.0.11-200.fc36.x86_64

Output of java -version

openjdk 17.0.5 2022-10-18

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

@pjgg pjgg added the kind/bug Something isn't working label Jan 4, 2023
@quarkus-bot quarkus-bot bot added area/mandrel area/persistence OBSOLETE, DO NOT USE labels Jan 4, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 4, 2023

/cc @Karm(mandrel), @galderz(mandrel), @mswatosh(db2), @zakkak(mandrel)

@michalvavrik
Copy link
Member

michalvavrik commented Jan 4, 2023

Thank you for opening the issue @pjgg .

@jerboaa kindly analysed it and provided fix here #28921 (comment), should be fixed by #28921. We can provide the fix separately, but the issue is with required resources for the test that verifies the issue, while #28921 already verifies the issue (CI was failing without the fix).

@quarkus-bot quarkus-bot bot added this to the 2.17 - main milestone Jan 19, 2023
michalvavrik added a commit to michalvavrik/quarkus-test-suite that referenced this issue Jan 24, 2023
michalvavrik added a commit to michalvavrik/quarkus-test-suite that referenced this issue Jan 24, 2023
pjgg pushed a commit to quarkus-qe/quarkus-test-suite that referenced this issue Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mandrel area/persistence OBSOLETE, DO NOT USE kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants