In the Java Web Real development, the use of microservices for architecture separation, today encountered a strange problem, Dububo called the interface three times, provider side and did not throw exception. The consumer throws an exception that fails the call.
Exceptions are as follows:
Org.springframework.web.servlet.mvc.annotation.responsestatusexceptionresolver-resolving exception from Handler [ Public Java.lang.String Com.nh.erp.optool.controller.group.OpPlanWorkController.getStorePriceInitInfo ( java.lang.String)]: Com.alibaba.dubbo.rpc.RpcException:Failed to invoke the method Findplanstorepriceinfovobyplanid In the service Com.nh.erp.productms.service.op.plan.IPlanService. Tried 3 times of the providers [192.168.34.26:8882] (1/1) from the registry 192.168.34.226:2181 on the consumer 192.168.34 .-Using the Dubbo version 2.8.4. Last error is:failed to invoke remote Method:findplanstorepriceinfovobyplanid, provider:dubbo://192.168.34.26:8882/ com.nh.erp.productms.service.op.plan.iplanservice?accepts=1000&anyhost=true&application= User-consumer-product&check=false&dubbo=2.8.4&generic=false&interface= Com.nh.erp.productms.service.op.plan.iplanservice&methods=getplanbasepriceinfo,getplanallappointlist, Getplanbaseinfo,updateplanstrategyinfo, Changeplanstatus,getplanallchannellist,getplanstartcity,getplanallinfo,findplanstorepriceinfovobyplanid, Lockgrouplogic,getorgcategoryareatabdatawithplannum,findproplanreceivablesvobyplanid, Getairticketsuppolicyvolistbyplanid,getbugetinfoinview,getplanhistorylist,updatechangerecremark, getplanworklistvolist&organization=nh&owner=programmer&pid=756&revision=1.0-snapshot& Serialization=dubbo&side=consumer&timeout=200000×tamp=1483753008842&validation=false, Cause:java.lang.NullPointerException
Java.lang.NullPointerException
At Com.google.common.base.Preconditions.checkNotNull (preconditions.java:210)
At Com.google.common.collect.singletonimmutablelist.<init> (singletonimmutablelist.java:40)
At Com.google.common.collect.singletonimmutablelist$bc30.newinstance (Singletonimmutablelist$bc30.java)
At Com.alibaba.dubbo.common.serialize.support.dubbo.builder$abstractobjectbuilder.parsefrom (Builder.java:962)
At Com.alibaba.dubbo.common.serialize.support.dubbo.GenericObjectInput.readObject (genericobjectinput.java:93)
At Com.alibaba.dubbo.common.serialize.support.dubbo.builder$5.parsefrom (builder.java:989)
At Com.nh.erp.productms.model.dto.op.plan.planstorepriceinfovo$bc22.readobject (PlanStorePriceInfoVo$bc22.java)
At Com.alibaba.dubbo.common.serialize.support.dubbo.builder$abstractobjectbuilder.parsefrom (Builder.java:964)
At Com.alibaba.dubbo.common.serialize.support.dubbo.GenericObjectInput.readObject (genericobjectinput.java:93)
At Com.alibaba.dubbo.common.serialize.support.dubbo.builder$5.parsefrom (builder.java:989)
At Com.nh.utils.response$bc1.readobject (Response$bc1.java)
At Com.alibaba.dubbo.common.serialize.support.dubbo.builder$abstractobjectbuilder.parsefrom (Builder.java:964)
At Com.alibaba.dubbo.common.serialize.support.dubbo.GenericObjectInput.readObject (genericobjectinput.java:93)
At Com.alibaba.dubbo.common.serialize.support.dubbo.GenericObjectInput.readObject (genericobjectinput.java:110)
At Com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode (decodeablerpcresult.java:87)
At Com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode (decodeablerpcresult.java:117)
At Com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody (dubbocodec.java:98)
At Com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode (exchangecodec.java:134)
At Com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode (exchangecodec.java:95)
At Com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode (dubbocountcodec.java:46)
At Com.alibaba.dubbo.remoting.transport.netty.nettycodecadapter$internaldecoder.messagereceived ( nettycodecadapter.java:134)
At Org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream (simplechannelupstreamhandler.java:80)
At Org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream (defaultchannelpipeline.java:564)
At Org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream (defaultchannelpipeline.java:559)
At Org.jboss.netty.channel.Channels.fireMessageReceived (channels.java:274)
At Org.jboss.netty.channel.Channels.fireMessageReceived (channels.java:261)
At Org.jboss.netty.channel.socket.nio.NioWorker.read (nioworker.java:351)
At Org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys (nioworker.java:282)
At Org.jboss.netty.channel.socket.nio.NioWorker.run (nioworker.java:202)
At Org.jboss.netty.util.ThreadRenamingRunnable.run (threadrenamingrunnable.java:108)
At Org.jboss.netty.util.internal.deadlockproofworker$1.run (deadlockproofworker.java:44)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1142)
At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:617)
At Java.lang.Thread.run (thread.java:745)
Notice that there is singletonimmutablelist in the exception, the interface returned by the guava Fluentiterable interface to another layer, into the Linkedlist,dubbo but no longer an error, the specific reason, Probably with Immutablelist.
Implementation related.
Dubbo and Immutablelist Conflict resolution