-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Netty's PlatformDependent
and PlatformDependent0
class initializers require reflective access to some classes ?
#37626
Comments
Since we moved `io.netty.util.internal.PlatformDependent`'s and `io.netty.util.internal.PlatformDependent0`' initialization at runtime we need to register `java.nio.DirectByteBuffer`'s constructors for reflective access to avoid miss-configurations due to not being able to access the constructor in https://github.com/netty/netty/blob/5db037beedca8aa5b6a486fa515cc6af013ced74/common/src/main/java/io/netty/util/internal/PlatformDependent0.java#L290-L292 More classes and methods need to be registered as discussed in quarkusio#37626 Closes Karm/mandrel-integration-tests#236
Since we moved `io.netty.util.internal.PlatformDependent`'s and `io.netty.util.internal.PlatformDependent0`' initialization at runtime we need to register `java.nio.DirectByteBuffer`'s constructors for reflective access to avoid miss-configurations due to not being able to access the constructor in https://github.com/netty/netty/blob/5db037beedca8aa5b6a486fa515cc6af013ced74/common/src/main/java/io/netty/util/internal/PlatformDependent0.java#L290-L292 More classes and methods need to be registered as discussed in quarkusio#37626 Closes Karm/mandrel-integration-tests#236
PlatformDependent
and PlatformDependent0
class initializers require reflective access to some classes PlatformDependent
and PlatformDependent0
class initializers require reflective access to some classes ?
I have the same issue with Quarkus 3.6.4, native-image built with multi-stage Dockerfile based on EnvironmentOutput of
|
Fixed by temporarily removing |
Describe the bug
In #37347 we moved
PlatformDependent
andPlatformDependent0
classes to run-time-initialization as they are PlatformDependent and thus need to be initialized on the target platform. However, their initializers seem to rely on reflection to initialize a number of fields which leads to issues when the reflective accesses fail due to Quarkus not registering the necessary classes and methods for reflection.Issue originally reported in Karm/mandrel-integration-tests#236
Expected behavior
Netty's
PlatformDependent
andPlatformDependent0
classes should be initialized based on the actual availability of methods and classes and not depending on the reflection configuration.Actual behavior
Netty's
PlatformDependent
andPlatformDependent0
classes are initialized differently than expected because reflective accesses fail.How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
21
Mandrel or GraalVM version (if different from Java)
23.1.1.0-Final
Quarkus version or git rev
3.6.1 and af6d3d7
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: