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

JOOQ got build error with Quarkus framework when build with native image #64

Open
renyijiu opened this issue May 12, 2022 · 12 comments
Open

Comments

@renyijiu
Copy link

Your question:

I have built a project with Quarkus framework and JOOQ library for database connection that runs with GraalVM native-image. When I compile natively, I get some jooq-related error messages, and I can't be sure if the missing dependencies are the cause. Run ./gradlew clean build -Dquarkus.package.type=native and the error message is as follows:

Error: Class initialization of io.grpc.netty.shaded.io.netty.util.internal.logging.Log4JLogger failed. This error is reported at image build time because class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4JLogger is registered for linking at image build time by command line Use the option --initialize-at-run-time=io.grpc.netty.shaded.io.netty.util.internal.logging.Log4JLogger to explicitly request delayed initialization of this class.
Original exception that caused the problem: java.lang.NoClassDefFoundError: org/apache/log4j/Priority
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
        at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1155)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:183)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:653)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:136)
        at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.shouldInitializeAtRuntime(ConfigurableClassInitialization.java:164)
        at com.oracle.svm.hosted.SVMHost.isInitialized(SVMHost.java:286)
        at com.oracle.graal.pointsto.meta.AnalysisType.isInitialized(AnalysisType.java:728)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.maybeEagerlyInitialize(BytecodeParser.java:4258)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4456)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4445)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4440)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5221)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3358)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.handleBytecodeBlock(BytecodeParser.java:3318)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3163)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1138)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:1030)
        at jdk.internal.vm.compiler/org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
        at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:79)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.run(Phase.java:49)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:236)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
        at jdk.internal.vm.compiler/org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
        at com.oracle.graal.pointsto.flow.AnalysisParsedGraph.parseBytecode(AnalysisParsedGraph.java:135)
        at com.oracle.graal.pointsto.meta.AnalysisMethod.ensureGraphParsed(AnalysisMethod.java:586)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:166)
        at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.createTypeFlow(MethodTypeFlow.java:301)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureTypeFlowCreated(MethodTypeFlow.java:290)
        at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:111)
        at com.oracle.graal.pointsto.DefaultAnalysisPolicy$DefaultVirtualInvokeTypeFlow.onObservedUpdate(DefaultAnalysisPolicy.java:252)
        at com.oracle.graal.pointsto.flow.TypeFlow.update(TypeFlow.java:552)
        at com.oracle.graal.pointsto.PointsToAnalysis$1.run(PointsToAnalysis.java:631)
        at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
        at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1395)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        ... 42 more
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2Logger. This error is reported at image build time because class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2LoggerFactory is registered for linking at image build time by command line
Trace: 
        at parsing io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2LoggerFactory.newInstance(Log4J2LoggerFactory.java:33)
Call path from entry point to io.grpc.netty.shaded.io.netty.util.internal.logging.Log4J2LoggerFactory.newInstance(String): 
        no path found from entry point to target method

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.persistence.Column. This error is reported at image build time because class org.jooq.impl.Tools is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.impl.Tools.lambda$getAnnotatedGetter$87(Tools.java:3940)
Call path from entry point to org.jooq.impl.Tools.lambda$getAnnotatedGetter$87(Class, String, boolean): 
        at org.jooq.impl.Tools.lambda$getAnnotatedGetter$87(Tools.java:3939)
        at org.jooq.impl.Tools$$Lambda$1946/0x00000007c2293008.get(Unknown Source)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:299)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY_System_getProperty_deeeaa72a006d330408a3b7d002c7533e108bc28(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.persistence.Column. This error is reported at image build time because class org.jooq.impl.Tools is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.impl.Tools.lambda$getAnnotatedMembers$81(Tools.java:3823)
Call path from entry point to org.jooq.impl.Tools.lambda$getAnnotatedMembers$81(Class, String, boolean): 
        at org.jooq.impl.Tools.lambda$getAnnotatedMembers$81(Tools.java:3820)
        at org.jooq.impl.Tools$$Lambda$1932/0x00000007c2291170.get(Unknown Source)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:299)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY_System_getProperty_deeeaa72a006d330408a3b7d002c7533e108bc28(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.persistence.Column. This error is reported at image build time because class org.jooq.impl.Tools is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.impl.Tools.lambda$getAnnotatedSetters$85(Tools.java:3891)
Call path from entry point to org.jooq.impl.Tools.lambda$getAnnotatedSetters$85(Class, String, boolean): 
        at org.jooq.impl.Tools.lambda$getAnnotatedSetters$85(Tools.java:3888)
        at org.jooq.impl.Tools$$Lambda$2071/0x00000007c22ac6a0.get(Unknown Source)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:299)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY_System_getProperty_deeeaa72a006d330408a3b7d002c7533e108bc28(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.persistence.Entity. This error is reported at image build time because class org.jooq.impl.Tools is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.impl.Tools.lambda$hasColumnAnnotations$79(Tools.java:3785)
Call path from entry point to org.jooq.impl.Tools.lambda$hasColumnAnnotations$79(Class): 
        at org.jooq.impl.Tools.lambda$hasColumnAnnotations$79(Tools.java:3775)
        at org.jooq.impl.Tools$$Lambda$1928/0x00000007c22908d0.get(Unknown Source)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:299)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY_System_getProperty_deeeaa72a006d330408a3b7d002c7533e108bc28(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.xml.bind.DatatypeConverter. This error is reported at image build time because class org.jooq.impl.AbstractResult is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.impl.AbstractResult.format0(AbstractResult.java:1372)
Call path from entry point to org.jooq.impl.AbstractResult.format0(Object, boolean, boolean): 
        at org.jooq.impl.AbstractResult.format0(AbstractResult.java:1366)
        at org.jooq.impl.AbstractResult.format(AbstractResult.java:284)
        at org.jooq.impl.AbstractFormattable.format(AbstractFormattable.java:117)
        at org.jooq.impl.ResultImpl.toString(ResultImpl.java:1129)
        at java.lang.StringConcatHelper.stringOf(StringConcatHelper.java:453)
        at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:344)
        at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_FindClass_3ec1032c6cb9443725d1e68194130533bfb04076(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.xml.bind.DatatypeConverter. This error is reported at image build time because class org.jooq.impl.AbstractResult is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.impl.AbstractResult.formatJSON0(AbstractResult.java:622)
Call path from entry point to org.jooq.impl.AbstractResult.formatJSON0(Object, Writer, JSONFormat): 
        at org.jooq.impl.AbstractResult.formatJSON0(AbstractResult.java:621)
        at org.jooq.impl.AbstractResult.formatJSONArray0(AbstractResult.java:735)
        at org.jooq.impl.AbstractResult.formatJSON(AbstractResult.java:567)
        at org.jooq.impl.AbstractFormattable.formatJSON(AbstractFormattable.java:260)
        at org.jooq.impl.Convert$ConvertAll.from(Convert.java:657)
        at org.jooq.Converters$$Lambda$1873/0x00000007c2288480.apply(Unknown Source)
        at sun.security.ec.ParametersMap$1.get(ParametersMap.java:78)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:299)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY_System_getProperty_deeeaa72a006d330408a3b7d002c7533e108bc28(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.xml.bind.DatatypeConverter. This error is reported at image build time because class org.jooq.impl.JSONReader is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.impl.JSONReader.patchRecord(JSONReader.java:220)
Call path from entry point to org.jooq.impl.JSONReader.patchRecord(DSLContext, boolean, Fields, List): 
        at org.jooq.impl.JSONReader.patchRecord(JSONReader.java:214)
        at org.jooq.impl.JSONReader.read(JSONReader.java:200)
        at org.jooq.impl.JSONReader.read(JSONReader.java:110)
        at org.jooq.impl.DefaultBinding$DefaultResultBinding.lambda$readMultiset$0(DefaultBinding.java:4039)
        at org.jooq.impl.DefaultBinding$DefaultResultBinding$$Lambda$2094/0x00000007c22af670.apply(Unknown Source)
        at sun.security.ec.ParametersMap$1.get(ParametersMap.java:78)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:216)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:169)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:299)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY_System_getProperty_deeeaa72a006d330408a3b7d002c7533e108bc28(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.xml.bind.annotation.XmlElementWrapper. This error is reported at image build time because class org.jooq.util.jaxb.tools.MiniJAXB is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.util.jaxb.tools.MiniJAXB.unmarshal0(MiniJAXB.java:246)
Call path from entry point to org.jooq.util.jaxb.tools.MiniJAXB.unmarshal0(Object, Element, Map): 
        at org.jooq.util.jaxb.tools.MiniJAXB.unmarshal0(MiniJAXB.java:226)
        at org.jooq.util.jaxb.tools.MiniJAXB.unmarshal0(MiniJAXB.java:178)
        at org.jooq.util.jaxb.tools.MiniJAXB.unmarshal(MiniJAXB.java:153)
        at org.jooq.impl.InformationSchemaMetaProvider.provide(InformationSchemaMetaProvider.java:79)
        at org.jooq.impl.SourceMetaProvider.provide(SourceMetaProvider.java:74)
        at org.jooq.impl.DefaultDSLContext.meta(DefaultDSLContext.java:460)
        at org.jooq.impl.MetaImpl$MetaSchema.lambda$initUksSQLite$5(MetaImpl.java:517)
        at org.jooq.impl.MetaImpl$MetaSchema$$Lambda$2397/0x00000007c22e2790.accept(Unknown Source)
        at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603)
        at org.postgresql.core.AsciiStringInterner.toString(AsciiStringInterner.java:345)
        at java.lang.StringConcatHelper.stringOf(StringConcatHelper.java:453)
        at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:344)
        at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_FindClass_3ec1032c6cb9443725d1e68194130533bfb04076(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: jakarta.xml.bind.annotation.XmlSchema. This error is reported at image build time because class org.jooq.util.jaxb.tools.MiniJAXB is registered for linking at image build time by command line
Trace: 
        at parsing org.jooq.util.jaxb.tools.MiniJAXB.getNamespace(MiniJAXB.java:400)
Call path from entry point to org.jooq.util.jaxb.tools.MiniJAXB.getNamespace(Class): 
        at org.jooq.util.jaxb.tools.MiniJAXB.getNamespace(MiniJAXB.java:400)
        at org.jooq.util.jaxb.tools.MiniJAXB.addDefaultNamespace(MiniJAXB.java:188)
        at org.jooq.util.jaxb.tools.MiniJAXB.unmarshal0(MiniJAXB.java:175)
        at org.jooq.util.jaxb.tools.MiniJAXB.unmarshal(MiniJAXB.java:153)
        at org.jooq.impl.InformationSchemaMetaProvider.provide(InformationSchemaMetaProvider.java:79)
        at org.jooq.impl.SourceMetaProvider.provide(SourceMetaProvider.java:74)
        at org.jooq.impl.DefaultDSLContext.meta(DefaultDSLContext.java:460)
        at org.jooq.impl.MetaImpl$MetaSchema.lambda$initUksSQLite$5(MetaImpl.java:517)
        at org.jooq.impl.MetaImpl$MetaSchema$$Lambda$2397/0x00000007c22e2790.accept(Unknown Source)
        at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603)
        at org.postgresql.core.AsciiStringInterner.toString(AsciiStringInterner.java:345)
        at java.lang.StringConcatHelper.stringOf(StringConcatHelper.java:453)
        at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:344)
        at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_FindClass_3ec1032c6cb9443725d1e68194130533bfb04076(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.log4j.Logger. This error is reported at image build time because class io.grpc.netty.shaded.io.netty.util.internal.logging.Log4JLoggerFactory is registered for linking at image build time by command line
Trace: 
        at parsing io.grpc.netty.shaded.io.netty.util.internal.logging.Log4JLoggerFactory.newInstance(Log4JLoggerFactory.java:38)
Call path from entry point to io.grpc.netty.shaded.io.netty.util.internal.logging.Log4JLoggerFactory.newInstance(String): 
        no path found from entry point to target method


        at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
        at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:751)
        ... 6 more
Error: Image build request failed with exit status 1

Versions:

  • jOOQ: 3.16.6
  • Java: openjdk version "17.0.3" 2022-04-19
  • Database (include vendor): postgres
  • OS: macOs monterey
  • JDBC Driver (include name if inofficial driver): postgres
  • GraalVM: GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06)
  • Quarkus: 2.9.0.Final

Not effective solution

Add the

implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'

dependencies in the project, and it seems nothing changed, still get errors.Is there something I'm missing? Thanks.

When i test with GraalVM CE 22.0.0.2, it successful create the native execute file.

@renyijiu
Copy link
Author

I also asked a related question in jooq, jOOQ/jOOQ#13550

@lukaseder
Copy link

I also asked a related question in jooq, jOOQ/jOOQ#13550

In that issue, I suggested you try working with the quarkiverse/quarkus-jooq third party contribution. However, you seem to have posted the exact same error report.

Have you changed your setup to use quarkiverse/quarkus-jooq yet, or have you just re-posted your error report here without changing anything?

@gsmet
Copy link
Member

gsmet commented May 12, 2022

The problem is using EE 10 dependencies: jakarta.xml.bind:jakarta.xml.bind-api:4.0.0.

You should stick to the dependencies brought by the io.quarkus:quarkus-jaxb extension until Quarkus moves to EE 10.

@renyijiu
Copy link
Author

I also asked a related question in jooq, jOOQ/jOOQ#13550

In that issue, I suggested you try working with the quarkiverse/quarkus-jooq third party contribution. However, you seem to have posted the exact same error report.

Have you changed your setup to use quarkiverse/quarkus-jooq yet, or have you just re-posted your error report here without changing anything?

@lukaseder I'm missing some of the information, I've used the relevant dependencies and these errors are generated on top of that

    implementation 'io.quarkus:quarkus-jdbc-postgresql'
    implementation "io.quarkiverse.jooq:quarkus-jooq:${quarkusJooqVersion}"
    implementation "org.postgresql:postgresql:${postgresqlDriverVersion}"

@lukaseder
Copy link

@renyijiu If the problem mentioned by @gsmet is the one causing this:

The problem is using EE 10 dependencies: jakarta.xml.bind:jakarta.xml.bind-api:4.0.0.

Then, I guess you should stick with jOOQ 3.15, for now?

@renyijiu
Copy link
Author

The problem is using EE 10 dependencies: jakarta.xml.bind:jakarta.xml.bind-api:4.0.0.

You should stick to the dependencies brought by the io.quarkus:quarkus-jaxb extension until Quarkus moves to EE 10.

I didn't add jakarta.xml.bind:jakarta.xml.bind-api:4.0.0 this dependency in the project. I just tried to add the dependency to solve the problem, but it didn't work. The same project compiles successfully with graalvm version 22.0.0.2, but with version 22.1, the above error message is displayed.

@renyijiu
Copy link
Author

The relevant dependency information is as follows

|    +--- jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 (c)

....

|    \--- org.jooq:jooq:3.15.5 -> 3.16.6
|         +--- io.r2dbc:r2dbc-spi:0.9.0.RELEASE
|         |    \--- org.reactivestreams:reactive-streams:1.0.3
|         \--- jakarta.xml.bind:jakarta.xml.bind-api:3.0.0 -> 2.3.3
|              \--- jakarta.activation:jakarta.activation-api:1.2.2 -> 1.2.1

...

jooqGenerator - The classpath used to invoke the jOOQ code generator. Add your JDBC driver, generator extensions, and additional dependencies here.
+--- org.jooq:jooq-codegen -> 3.16.6
|    +--- org.jooq:jooq:3.16.6
|    |    +--- io.r2dbc:r2dbc-spi:0.9.0.RELEASE
|    |    |    \--- org.reactivestreams:reactive-streams:1.0.3
|    |    \--- jakarta.xml.bind:jakarta.xml.bind-api:3.0.0
|    |         \--- com.sun.activation:jakarta.activation:2.0.0
|    \--- org.jooq:jooq-meta:3.16.6
|         \--- org.jooq:jooq:3.16.6 (*)
+--- org.jooq:jooq-meta-extensions:3.16.6
|    +--- org.jooq:jooq-meta:3.16.6 (*)
|    \--- com.h2database:h2:2.1.210 -> 2.1.212
\--- com.h2database:h2:2.1.212

@renyijiu
Copy link
Author

@lukaseder @gsmet
https://github.com/renyijiu/quarkus-jooq-issue-demo I build a demo project, run ./gradlew build -Dquarkus.package.type=native will get the same errors.

@apatrida
Copy link

apatrida commented May 16, 2022

@renyijiu the problem is that you are using libraries that are not compatible. You cannot use JOOQ 3.16.x yet, and will have to wait for Quarkus 2.10.0 to be able to combine the two. Any fix for the incompatibility is outside the scope of this project for which you are reporting an issue.

Basically, you have done something that won't work, and want their help fixing it. Instead, use JOOQ 3.15.5 and don't upgrade it until later.

Note the nu.studer.jooq code generation Gradle plugin must be reverted to 6.0.1 as well when using JOOQ 3.15.5.

An alternative is also to not use native images until these libraries are all compatible again or you figure out how to hack in dependencies.

@renyijiu
Copy link
Author

@renyijiu the problem is that you are using libraries that are not compatible. You cannot use JOOQ 3.16.x yet, and will have to wait for Quarkus 2.10.0 to be able to combine the two. Any fix for the incompatibility is outside the scope of this project for which you are reporting an issue.

Basically, you have done something that won't work, and want their help fixing it. Instead, use JOOQ 3.15.5 and don't upgrade it until later.

Note the nu.studer.jooq code generation Gradle plugin must be reverted to 6.0.1 as well when using JOOQ 3.15.5.

An alternative is also to not use native images until these libraries are all compatible again or you figure out how to hack in dependencies.

Thanks for your answer, it works well on graalvm version 22.0.0.2, I will keep this version for now and wait for the new release to test and verify again

@uPagge
Copy link

uPagge commented Nov 17, 2022

@renyijiu Is there any news on this issue? Faced the same error

@renyijiu
Copy link
Author

@renyijiu Is there any news on this issue? Faced the same error

graalvm 22.3, quarkus 2.14.1 still build with same error

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

No branches or pull requests

5 participants