canal java.lang.NoClassDefFoundError: Could not initialize class io.netty.util.internal.PlatformDependent0

5vf7fwbs  于 4个月前  发布在  Java
关注(0)|答案(1)|浏览(184)

Question

启动canal1.1.6 deployer时报错,完整如下:
java.lang.NoClassDefFoundError: Could not initialize class io.netty.util.internal.PlatformDependent0
at io.netty.util.internal.PlatformDependent.(PlatformDependent.java:101) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.ConstantPool.(ConstantPool.java:32) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.Signal$1.(Signal.java:27) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.Signal.(Signal.java:27) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.concurrent.DefaultPromise.(DefaultPromise.java:42) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:36) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:58) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:47) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:58) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:77) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:72) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:59) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at org.apache.rocketmq.remoting.netty.NettyRemotingClient.(NettyRemotingClient.java:122) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at org.apache.rocketmq.client.impl.MQClientAPIImpl.(MQClientAPIImpl.java:188) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at org.apache.rocketmq.client.impl.factory.MQClientInstance.(MQClientInstance.java:133) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at org.apache.rocketmq.client.impl.MQClientManager.getOrCreateMQClientInstance(MQClientManager.java:53) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.start(DefaultMQProducerImpl.java:189) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.start(DefaultMQProducerImpl.java:175) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at org.apache.rocketmq.client.producer.DefaultMQProducer.start(DefaultMQProducer.java:272) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at com.alibaba.otter.canal.connector.rocketmq.producer.CanalRocketMQProducer.init(CanalRocketMQProducer.java:86) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at com.alibaba.otter.canal.deployer.CanalStarter.start(CanalStarter.java:72) ~[canal.deployer-1.1.6.jar:na]
at com.alibaba.otter.canal.deployer.CanalLauncher.main(CanalLauncher.java:124) ~[canal.deployer-1.1.6.jar:na]
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @3967e60c [in thread "main"]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[na:na]
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) ~[na:na]
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) ~[na:na]
at io.netty.util.internal.PlatformDependent0$1.run(PlatformDependent0.java:69) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) ~[na:na]
at io.netty.util.internal.PlatformDependent0.(PlatformDependent0.java:64) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.internal.PlatformDependent.getSystemClassLoader(PlatformDependent.java:939) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.internal.PlatformDependent.isAndroid0(PlatformDependent.java:956) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
at io.netty.util.internal.PlatformDependent.(PlatformDependent.java:81) ~[connector.rocketmq-1.1.6-jar-with-dependencies.jar:na]
... 21 common frames omitted

ugmeyewa

ugmeyewa1#

感觉是jdk版本的问题,目前测试验证是jdk 8和jdk 11

相关问题