Closed guoxiangdaxia closed 6 years ago
I am a little confused of your stack trace. Why would a consumer throw "Failed to send response" exception. Could you describe the detailed procedure of stopping services?
Caused by: java.lang.ClassNotFoundException: com.alibaba.com.caucho.hessian.io.JavaSerializer
@guoxiangdaxia Check the packaged dubbo.jar(hessian-lite module), If it is maven download package, delete the local repository and download it again, mvn -U clean install
Without feedback, we will close it. Feel free to reopen if necessary.
consumer日志: 进入web--test--b [ztyq_test-web] [2018-03-16 15:54:00:921] [INFO] - com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry(404) - [DUBBO] Notify urls for subscribe url consumer://10.255.1.94/com.test.ztyq.service.BaseService?application=ztyq_test-web&category=providers,configurators,routers&default.check=false&dubbo=2.5.6&interface=com.test.ztyq.service.BaseService&methods=getEncryptStr,getDecryptStr&pid=10008&side=consumer&timeout=40000×tamp=1521186341932, urls: [empty://10.255.1.94/com.test.ztyq.service.BaseService?application=ztyq_test-web&category=providers&default.check=false&dubbo=2.5.6&interface=com.test.ztyq.service.BaseService&methods=getEncryptStr,getDecryptStr&pid=10008&side=consumer&timeout=40000×tamp=1521186341932], dubbo version: 2.5.6, current host: 10.255.1.94 com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method getEncryptStr in the service com.test.ztyq.service.BaseService. Tried 1 times of the providers [10.255.1.94:20885] (1/1) from the registry localhost:2181 on the consumer 10.255.1.94 using the dubbo version 2.5.6. Last error is: Failed to invoke remote method: getEncryptStr, provider: dubbo://10.255.1.94:20885/com.test.ztyq.service.BaseService?anyhost=true&application=ztyq_test-web&check=false&default.check=false&default.loadbalance=leastactive&default.retries=0&default.timeout=50000&dubbo=2.5.6&generic=false&interface=com.test.ztyq.service.BaseService&methods=getEncryptStr,getDecryptStr&pid=10008&remote.timestamp=1521186655116&serialization=hessian2&side=consumer&timeout=40000×tamp=1521186341932, cause: Failed to send response: Response [id=4, version=2.0.0, status=20, event=false, error=null, result=RpcResult [result=com.test.ztyq.entity.ApiAccResData@1fc39826, exception=null]], cause: java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/JavaSerializer java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/JavaSerializer at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:326) at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:381) at com.alibaba.dubbo.common.serialize.support.hessian.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:79) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.encodeResponseData(DubboCodec.java:193) at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encodeResponse(ExchangeCodec.java:269) at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:70) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:39) at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:81) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:66) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:776) at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:304) at com.alibaba.dubbo.remoting.transport.netty.NettyHandler.writeRequested(NettyHandler.java:99) at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:266) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582) at org.jboss.netty.channel.Channels.write(Channels.java:611) at org.jboss.netty.channel.Channels.write(Channels.java:578) at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251) at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:98) at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:54) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:171) at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52) at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:81) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: com.alibaba.com.caucho.hessian.io.JavaSerializer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709) ... 27 more
Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to send response: Response [id=4, version=2.0.0, status=20, event=false, error=null, result=RpcResult [result=com.test.ztyq.entity.ApiAccResData@1fc39826, exception=null]], cause: java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/JavaSerializer java.lang.NoClassDefFoundError: com/alibaba/com/caucho/hessian/io/JavaSerializer at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:326) at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:381) at com.alibaba.dubbo.common.serialize.support.hessian.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:79) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.encodeResponseData(DubboCodec.java:193) at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encodeResponse(ExchangeCodec.java:269) at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:70) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:39) at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:81) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:66) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:776) at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:304) at com.alibaba.dubbo.remoting.transport.netty.NettyHandler.writeRequested(NettyHandler.java:99) at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:266) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582) at org.jboss.netty.channel.Channels.write(Channels.java:611) at org.jboss.netty.channel.Channels.write(Channels.java:578) at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251) at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:98) at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:54) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:171) at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52) at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:81) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: com.alibaba.com.caucho.hessian.io.JavaSerializer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709) ... 27 more