当前位置: 首页 > 工具软件 > dubbo2.js > 使用案例 >

No such extension com.alibaba.dubbo.common.serialize.Serialization by name hessian2

慕容宇
2023-12-01
Failed to invoke the method queryValueByName in the service com.zto56.cuckoo.cloud.service.order.IOrderCommonService. Tried 1 times of the providers [10.86.10.43:20830] (1/1) from the registry 10.15.10.213:8848 on the consumer 10.86.10.43 using the dubbo version 2.6.7. Last error is: Failed to invoke remote method: queryValueByName, provider: dubbo://10.86.10.43:20830/com.zto56.cuckoo.cloud.service.order.IOrderCommonService?anyhost=true&application=cuckoo-cloud-print-consumer&bean.name=com.zto56.cuckoo.cloud.service.order.IOrderCommonService&category=providers&check=false&default.accepts=1000&default.check=false&default.cluster=failover&default.loadbalance=random&default.payload=52428800&default.retries=0&default.timeout=180000&dubbo=2.0.2&generic=false&interface=com.zto56.cuckoo.cloud.service.order.IOrderCommonService&logger=log4j&methods=queryValueByName&pid=2632&protocol=dubbo&qos.port=55556&register.ip=10.86.10.43&remote.timestamp=1628217306711&retries=0&revision=1.0-SNAPSHOT&side=consumer&timestamp=1628217359028, cause: io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: No such extension com.alibaba.dubbo.common.serialize.Serialization by name hessian2
io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: No such extension com.alibaba.dubbo.common.serialize.Serialization by name hessian2
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:739)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:731)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:817)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:724)
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:106)
	at com.alibaba.dubbo.remoting.transport.netty4.NettyClientHandler.write(NettyClientHandler.java:85)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:739)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:731)
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1090)
	at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1137)
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1079)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:445)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: No such extension com.alibaba.dubbo.common.serialize.Serialization by name hessian2
	at com.alibaba.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:482)
	at com.alibaba.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:489)
	at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:309)
	at com.alibaba.dubbo.remoting.transport.CodecSupport.getSerialization(CodecSupport.java:65)
	at com.alibaba.dubbo.remoting.transport.AbstractCodec.getSerialization(AbstractCodec.java:51)
	at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:212)
	at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:72)
	at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:38)
	at com.alibaba.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:70)
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
	... 19 more

添加如下任意一个包:

 <!--  <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-hessian-extension</artifactId>
            <version>2.5.7</version>
        </dependency>-->

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo-serialization-hessian2</artifactId>
            <version>2.6.10.1</version>
        </dependency>

 类似资料:

相关阅读

相关文章

相关问答