eventmesh icon indicating copy to clipboard operation
eventmesh copied to clipboard

[Bug] Netty Reflective setAccessible(true) warning under JDK11

Open Pil0tXia opened this issue 1 year ago • 0 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Environment

Windows

EventMesh version

master

What happened

Exception stack trace was displayed when EventMesh startup.

How to reproduce

Use JDK11 to start EventMesh.

Debug logs

2023-12-19 00:42:38,749 DEBUG [main] PlatformDependent0(PlatformDependent0.java:433) - -Dio.netty.noUnsafe: false
2023-12-19 00:42:38,749 DEBUG [main] PlatformDependent0(PlatformDependent0.java:927) - Java version: 11
2023-12-19 00:42:38,750 DEBUG [main] PlatformDependent0(PlatformDependent0.java:131) - sun.misc.Unsafe.theUnsafe: available
2023-12-19 00:42:38,751 DEBUG [main] PlatformDependent0(PlatformDependent0.java:155) - sun.misc.Unsafe.copyMemory: available
2023-12-19 00:42:38,751 DEBUG [main] PlatformDependent0(PlatformDependent0.java:193) - java.nio.Buffer.address: available
2023-12-19 00:42:38,753 DEBUG [main] PlatformDependent0(PlatformDependent0.java:267) - direct buffer constructor: unavailable
java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
	at io.grpc.netty.shaded.io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31) ~[grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$4.run(PlatformDependent0.java:239) ~[grpc-netty-shaded-1.43.2.jar:1.43.2]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:233) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:294) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:93) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.<init>(AsciiString.java:223) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.<init>(AsciiString.java:210) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.cached(AsciiString.java:1401) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.<clinit>(AsciiString.java:48) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.Utils.<clinit>(Utils.java:78) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder.<clinit>(NettyServerBuilder.java:83) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider.builderForPort(NettyServerProvider.java:40) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider.builderForPort(NettyServerProvider.java:25) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.ServerBuilder.forPort(ServerBuilder.java:44) [grpc-api-1.43.2.jar:1.43.2]
	at org.apache.eventmesh.runtime.boot.EventMeshGrpcServer.init(EventMeshGrpcServer.java:121) [classes/:?]
	at org.apache.eventmesh.runtime.boot.EventMeshGrpcBootstrap.init(EventMeshGrpcBootstrap.java:47) [classes/:?]
	at org.apache.eventmesh.runtime.boot.EventMeshServer.init(EventMeshServer.java:125) [classes/:?]
	at org.apache.eventmesh.runtime.boot.EventMeshStartup.main(EventMeshStartup.java:40) [classes/:?]
	at org.apache.eventmesh.starter.StartUp.main(StartUp.java:25) [classes/:?]
2023-12-19 00:42:38,760 DEBUG [main] PlatformDependent0(PlatformDependent0.java:332) - java.nio.Bits.unaligned: available, true
2023-12-19 00:42:38,761 DEBUG [main] PlatformDependent0(PlatformDependent0.java:391) - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable
java.lang.IllegalAccessException: class io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @10c8f62
	at jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361) ~[?:?]
	at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:558) ~[?:?]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:353) ~[grpc-netty-shaded-1.43.2.jar:1.43.2]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:344) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:294) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:93) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.<init>(AsciiString.java:223) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.<init>(AsciiString.java:210) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.cached(AsciiString.java:1401) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.netty.util.AsciiString.<clinit>(AsciiString.java:48) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.Utils.<clinit>(Utils.java:78) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder.<clinit>(NettyServerBuilder.java:83) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider.builderForPort(NettyServerProvider.java:40) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider.builderForPort(NettyServerProvider.java:25) [grpc-netty-shaded-1.43.2.jar:1.43.2]
	at io.grpc.ServerBuilder.forPort(ServerBuilder.java:44) [grpc-api-1.43.2.jar:1.43.2]
	at org.apache.eventmesh.runtime.boot.EventMeshGrpcServer.init(EventMeshGrpcServer.java:121) [classes/:?]
	at org.apache.eventmesh.runtime.boot.EventMeshGrpcBootstrap.init(EventMeshGrpcBootstrap.java:47) [classes/:?]
	at org.apache.eventmesh.runtime.boot.EventMeshServer.init(EventMeshServer.java:125) [classes/:?]
	at org.apache.eventmesh.runtime.boot.EventMeshStartup.main(EventMeshStartup.java:40) [classes/:?]
	at org.apache.eventmesh.starter.StartUp.main(StartUp.java:25) [classes/:?]

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

Pil0tXia avatar Dec 18 '23 16:12 Pil0tXia