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

Multiple "Could not register" warnings for io.netty classes in 2.13.7 during native compilation #30508

Closed
fedinskiy opened this issue Jan 20, 2023 · 6 comments
Labels
area/native-image kind/bug Something isn't working

Comments

@fedinskiy
Copy link
Contributor

Describe the bug

After upgrade to 2.13.7.Final, there are multiple "Could not register" warnings during native compilation. They all involve classes from "io.netty.handler.codec" package and have "java.lang.NoClassDefFoundError" as a reason. The functionality doesn't seem to be affected.

Expected behavior

Same as 2.13.6.Final

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 [email protected]:quarkus-qe/quarkus-startstop.git -b 2.13
  2. cd quarkus-startstop/app-jax-rs-minimal
  3. mvn clean compile package -Pnative -Dquarkus.version=2.13.7.Final -Dquarkus.platform.group-id=io.quarkus.platform
    Command mvn clean compile package -Pnative -Dquarkus.version=2.13.6.Final -Dquarkus.platform.group-id=io.quarkus.platform doesn't have such problem

Output of uname -a or ver

6.0.18-300.fc37.x86_64

Output of java -version

17.0.4, vendor: GraalVM Community

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.13.7.Final

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

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)

Additional information

No response

@fedinskiy fedinskiy added the kind/bug Something isn't working label Jan 20, 2023
@gsmet
Copy link
Member

gsmet commented Jan 20, 2023

If we want this fixed, we might have to backport https://github.com/quarkusio/quarkus/pull/29493/files .

@Karm
Copy link
Member

Karm commented Jan 24, 2023

I can see that with my Quarkus MicroProfile apps too.

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.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.MarshallingEncoder: 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.protobuf.ProtobufDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: com/google/protobuf/ExtensionRegistryLite.
Warning: Could not register io.netty.handler.codec.marshalling.CompatibleMarshallingDecoder: queryAllPublicMethods for reflection. Reason: java.lang.NoClassDefFoundError: org/jboss/marshalling/ByteInput.

It is a regression from 2.13.6.Final. So IMHO backport is in order.

@Karm
Copy link
Member

Karm commented Jan 30, 2023

@pjgg ^^^

fedinskiy added a commit to fedinskiy/quarkus-startstop that referenced this issue Jan 31, 2023
Fixes failures due to two upstreams issues:
Missing classes: quarkusio/quarkus#30508
Missing builder image: quarkusio/quarkus#30738
fedinskiy added a commit to fedinskiy/quarkus-startstop that referenced this issue Jan 31, 2023
Fixes failures due to two upstreams issues:
Missing classes: quarkusio/quarkus#30508
fedinskiy added a commit to quarkus-qe/quarkus-startstop that referenced this issue Feb 1, 2023
Fixes failures due to two upstreams issues:
Missing classes: quarkusio/quarkus#30508
@fragaLY
Copy link

fragaLY commented Feb 22, 2023

Not a Quarkus problem. The same issue is in Micronaut as well.

@gsmet
Copy link
Member

gsmet commented Feb 22, 2023

We will need to backport #29493 to 2.13.

@zakkak
Copy link
Contributor

zakkak commented Oct 17, 2023

Backported to 2.13 with 4065056

@zakkak zakkak closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants