question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recent change introduced warnings while building native image of MongoDB Client (and possibly others)

See original GitHub issue

Describe the bug

With a recent change native compilation of the MongoDB Client integration test results in warnings.

See https://github.com/quarkusio/quarkus/actions/runs/3523161137/jobs/5909184730#step:12:380

Expected behavior

No warnings should be printed.

Actual behavior

Warning: Could not register io.netty.handler.codec.compression.Lz4FrameDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register io.netty.handler.codec.protobuf.ProtobufDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: com/google/protobuf/ExtensionRegistryLite.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.compression.Lz4FrameEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: net/jpountz/lz4/LZ4Exception.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.
Warning: Could not register io.netty.handler.codec.marshalling.MarshallingEncoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteOutput.
Warning: Could not register io.netty.handler.codec.protobuf.ProtobufDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: com/google/protobuf/ExtensionRegistryLite.

How to Reproduce?

  1. git clone git@github.com:quarkusio/quarkus.git
  2. cd quarkus
  3. ./mvnw -Dquickly -T2
./mvnw -e --settings .github/mvn-settings.xml --fail-at-end \
    -f integration-tests -pl mongodb-client \
    -Dtest-containers -Dstart-containers \
    -Dquarkus.native.native-image-xmx=5g -Dnative \
    -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests \
    clean install -DskipDocs \
    -Dquarkus.native.container-build=true

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

e67b1333eb51512e031c225c291a50628bc2b23d

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Sannecommented, Nov 25, 2022

Yes I’d agree with using ExcludeConfigBuildItem ; @zakkak see an example here: https://github.com/quarkusio/quarkus/blob/23f43c3d3be6f479f86f697888856a8c65d8136d/extensions/jdbc/jdbc-oracle/deployment/src/main/java/io/quarkus/jdbc/oracle/deployment/OracleMetadataOverrides.java#L110-L117

needs a bit of fiddling with Regexp 😕 And careful, I had to iterate on the current regex as the regex needs to be passed as command line, not all symbols are valid on Windows so it’s a bit tricky.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning on Connecting to MongoDB with a Node server
7 Answers 7 ... My advice is to leave it as it is (maybe place a warning). The useUnifiedTopology: true option does not...
Read more >
graalvm/native-image - Gitter
The issue comes about when running this application with docker, I do not see the start up log messages I expect and I...
Read more >
Release Notes for MongoDB Enterprise Kubernetes Operator
Kubernetes Operator version 1.15.1 fixes an issue that prevented the Kubernetes Operator upgrade when managing a TLS-enabled Application Database whose TLS ...
Read more >
Spring Native documentation
The Spring AOT plugin performs ahead-of-time transformations required to improve native image compatibility and footprint. Maven. Gradle Groovy.
Read more >
All configuration options - Quarkus
AWS Lambda Type Default AWS Lambda Common Type Default AWS Lambda Gateway REST API Type Default Agroal ‑ Database connection pool Type Default
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found