You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "soiz-tor (via GitHub)" <gi...@apache.org> on 2023/03/06 21:05:10 UTC

[GitHub] [dubbo] soiz-tor opened a new issue, #11754: 按照官网给出的配置,kryo序列化在consumer会报错

soiz-tor opened a new issue, #11754:
URL: https://github.com/apache/dubbo/issues/11754

   官网kryo序列化配置链接:https://dubbo.apache.org/zh-cn/overview/what/ecosystem/serialization/kryo/
   
   环境:
   jdk:19
   dubbo:3.2.0-beta.5
   spring boot:3.0.4
   
   在consumer添加了对应依赖后,并设置了dubbo.protocol.serialization=kryo,consumer启动报错
   报错信息:
   ```
   Caused by: org.apache.dubbo.remoting.RemotingException: Failed to send message Request [id=5, version=2.0.2, twoWay=true, event=false, broken=false, data=null] to /192.168.189.1:20880, cause: com/esotericsoftware/kryo/pool/KryoFactory
   	at org.apache.dubbo.remoting.transport.netty4.NettyChannel.send(NettyChannel.java:226) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.remoting.transport.AbstractClient.send(AbstractClient.java:202) ~[dubbo-remoting-api-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:53) ~[dubbo-remoting-api-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:136) ~[dubbo-remoting-api-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:100) ~[dubbo-remoting-api-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:109) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5]
   	... 22 common frames omitted
   Caused by: java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/pool/KryoFactory
   	at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
   	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1013) ~[na:na]
   	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[na:na]
   	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862) ~[na:na]
   	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760) ~[na:na]
   	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681) ~[na:na]
   	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) ~[na:na]
   	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
   	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
   	at org.apache.dubbo.common.serialize.kryo.KryoObjectOutput.<init>(KryoObjectOutput.java:39) ~[dubbo-serialization-kryo-2.7.22.jar:2.7.22]
   	at org.apache.dubbo.common.serialize.kryo.KryoSerialization.serialize(KryoSerialization.java:51) ~[dubbo-serialization-kryo-2.7.22.jar:2.7.22]
   	at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:257) ~[dubbo-remoting-api-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:75) ~[dubbo-remoting-api-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:53) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5]
   	at org.apache.dubbo.remoting.transport.netty4.NettyChannel.send(NettyChannel.java:192) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5]
   	... 27 common frames omitted
   Caused by: java.lang.ClassNotFoundException: com.esotericsoftware.kryo.pool.KryoFactory
   	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
   	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
   	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
   	... 42 common frames omitted
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] EarthChen commented on issue #11754: 按照官网给出的配置,kryo序列化在consumer会报错

Posted by "EarthChen (via GitHub)" <gi...@apache.org>.
EarthChen commented on issue #11754:
URL: https://github.com/apache/dubbo/issues/11754#issuecomment-1457670783

   在 spi 中找一下kryo 的依赖,第三方序列化不包含在 dubbo 主依赖中


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #11754: 按照官网给出的配置,kryo序列化在consumer会报错

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11754:
URL: https://github.com/apache/dubbo/issues/11754#issuecomment-1466015371

   这个应该和 kryo4 kryo5 的版本差异有关系


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org