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.0.0.CR3] ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage, PubSub and BigQuery test #2692

Closed
ppalaga opened this issue May 31, 2021 · 3 comments
Milestone

Comments

@ppalaga
Copy link
Contributor

ppalaga commented May 31, 2021

Related to quarkusio/quarkus@a8a239a

Netty now depends on Brotli4J. Brotli is a compression algorithm.
The implementation uses a native dependency. At the moment, we won't support Brotli in native mode. This
commit adds a substitution to disable it. All decoders using Brotli related classes have been substituted to avoid having to depend on the Brotli4J dependency.

Apparently the Google Storage code somehow depends on Brotli4J.

I am disabling the native mode in the named test modules.

[INFO] --- quarkus-maven-plugin:2.0.0.CR2:build (quarkus-build) @ camel-quarkus-integration-test-google-storage ---
[INFO] [org.jboss.threads] JBoss Threads version 3.4.0.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/ppalaga/orgs/quarkus/camel-quarkus/integration-tests/google-storage/target/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-native-image-source-jar/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/ppalaga/orgs/quarkus/camel-quarkus/integration-tests/google-storage/target/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-native-image-source-jar/camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 21.1.0 Java 11 CE (Java Version 11.0.11+8-jvmci-21.1-b05)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] /home/ppalaga/.sdkman/candidates/java/21.1.0.r11-grl/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=IE -J-Dfile.encoding=UTF-8 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https -H:NativeLinkerOption=-no-pie -H:-UseServiceLoaderFeature -H:+StackTrace camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner
[camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner:56824]    classlist:   2,707.59 ms,  1.68 GB
[camel-quarkus-integration-test-google-storage-2.0.0-SNAPSHOT-runner:56824]        setup:     699.80 ms,  1.68 GB
Fatal error:java.lang.NoClassDefFoundError
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:603)
        at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
        at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:499)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:370)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:531)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
        at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:568)
Caused by: java.lang.NoClassDefFoundError: Lcom/aayushatharva/brotli4j/decoder/DecoderJNI$Wrapper;
        at java.base/java.lang.Class.getDeclaredFields0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3061)
        at java.base/java.lang.Class.getDeclaredFields(Class.java:2248)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleDeletedClass(AnnotationSubstitutionProcessor.java:531)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:306)
        at com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:266)
        at com.oracle.svm.hosted.NativeImageGenerator.createDeclarativeSubstitutionProcessor(NativeImageGenerator.java:954)
        at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:888)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:580)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$2(NativeImageGenerator.java:495)
        at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Caused by: java.lang.ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 16 more
@ppalaga ppalaga added this to the 2.0.0 milestone May 31, 2021
@ppalaga ppalaga changed the title ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage test ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage, PubSub and BigQuery test May 31, 2021
ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue May 31, 2021
@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 1, 2021

@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 1, 2021

Will be fixed in Quarkus 2.0.0.CR3 via https://github.com/quarkusio/quarkus/pull/17604/files

@ppalaga ppalaga changed the title ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage, PubSub and BigQuery test [Quarkus 2.0.0.CR3] ClassNotFoundException: com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage, PubSub and BigQuery test Jun 1, 2021
@ppalaga ppalaga modified the milestones: 2.0.0, 2.0.0-M2 Jun 4, 2021
ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue Jun 4, 2021
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage,
PubSub and BigQuery test apache#2692

Fixed by the upgrade to Quarkus 2.0.0.CR3

This reverts commit ff1bf3a.
ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue Jun 4, 2021
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage,
PubSub and BigQuery test apache#2692

Fixed by the upgrade to Quarkus 2.0.0.CR3

This reverts commit ff1bf3a.
ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue Jun 4, 2021
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage,
PubSub and BigQuery test apache#2692

Fixed by the upgrade to Quarkus 2.0.0.CR3

This reverts commit ff1bf3a.
ppalaga added a commit to ppalaga/camel-quarkus that referenced this issue Jun 6, 2021
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage,
PubSub and BigQuery test apache#2692

Fixed by the upgrade to Quarkus 2.0.0.CR3

This reverts commit ff1bf3a.
ppalaga added a commit that referenced this issue Jun 7, 2021
com.aayushatharva.brotli4j.decoder.DecoderJNI$Wrapper in Google Storage,
PubSub and BigQuery test #2692

Fixed by the upgrade to Quarkus 2.0.0.CR3

This reverts commit ff1bf3a.
@ppalaga
Copy link
Contributor Author

ppalaga commented Jun 7, 2021

Does not occur since the upgrade to Quarkus 2.0.0.CR3 via #2722 The native mode in the named test modules re-enabled via 4e04a50

@ppalaga ppalaga closed this as completed Jun 7, 2021
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

1 participant