159 Star 620 Fork 237

GVPSOFAStack / sofa-bolt

NullPointerException : ProtocolCodeBasedEncoder.encode

Done
封云鸿  Opened this issue
Caused by: com.alipay.remoting.rpc.exception.InvokeSendFailedException: Rpc invocation send failed! the address is 127.0.0.1:12301
	at com.alipay.remoting.rpc.RpcResponseResolver.preProcess(RpcResponseResolver.java:95)
	at com.alipay.remoting.rpc.RpcResponseResolver.resolveResponseObject(RpcResponseResolver.java:56)
	at com.alipay.remoting.rpc.RpcRemoting.invokeSync(RpcRemoting.java:186)
	at com.alipay.remoting.rpc.RpcClientRemoting.invokeSync(RpcClientRemoting.java:67)
	at com.alipay.remoting.rpc.RpcClient.invokeSync(RpcClient.java:350)
	at com.alipay.sofa.rpc.transport.bolt.BoltClientTransport.doInvokeSync(BoltClientTransport.java:289)
	at com.alipay.sofa.rpc.transport.bolt.BoltClientTransport.syncSend(BoltClientTransport.java:262)
	... 83 more
Caused by: io.netty.handler.codec.EncoderException: java.lang.NullPointerException
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
	at io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:302)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:106)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
	at io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:106)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
	at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
	at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
	at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
	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:404)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:446)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	... 1 more
Caused by: java.lang.NullPointerException
	at com.alipay.remoting.codec.ProtocolCodeBasedEncoder.encode(ProtocolCodeBasedEncoder.java:61)
	at com.alipay.remoting.codec.ProtocolCodeBasedEncoder.encode(ProtocolCodeBasedEncoder.java:39)
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
	... 27 more
 ServletWebRequest: uri=/handle/data/h2c;client=127.0.0.1

904557 none heart 1578935488 66825 ujjboy 1578916125 total 2 participants

Comments (4)

904557 none heart 1578935488
封云鸿 2020-06-30 10:45

sofa-bolt 1.4.6
mvn 3.6.1
jdk 1..8.171
proto : hessian2
通信 : h2c
联通方式 直连 <sofa:route target-url="h2c://127.0.0.1:12301"/>

66825 ujjboy 1578916125
Geng Zhang 2020-06-30 11:26 member

sofa-rpc 里带的 bolt 应该是 1.5.x 吧?

904557 none heart 1578935488
封云鸿 2020-06-30 14:00

输入图片说明

904557 none heart 1578935488
封云鸿 2020-06-30 14:00

sofa-rpc 里带的 bolt 应该是 1.5.x 吧?

@Geng Zhang 不是、sofa-rpc是 5.4.7 带的bolt是1.4.6

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://git.oschina.net/sofastack/sofa-bolt.git
git@git.oschina.net:sofastack/sofa-bolt.git
sofastack
sofa-bolt
sofa-bolt

Search