Closed kewang85 closed 3 years ago
I am running locally, no error
你可以检查下 你的 provider 端是否配置了 callback 参数,如果没有配置,当consumer 从 注册中心读取数据时候,是不会再url中写入参数回调信息的,所以就回走Hessian 的setObject ,也就是会检查序列化。而匿名内部类没有实现序列化,所以报错。
No feedback for a long time, please close the issue temporarily. If there is still a problem, you can reopen it.
采用点对点直连方式的时候,dubbo-samples-callback运行的时候报org.apache.dubbo.samples.callback.CallbackServiceIT$$Lambda$132/0x0000000801328440 must implement java.io.Serializable
Environment
Steps to reproduce this issue
报如下异常: Caused by: java.lang.IllegalStateException: Serialized class org.apache.dubbo.samples.callback.CallbackServiceIT$$Lambda$132/0x0000000801328440 must implement java.io.Serializable at com.alibaba.com.caucho.hessian.io.SerializerFactory.getDefaultSerializer(SerializerFactory.java:401) at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:375) at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:389) at org.apache.dubbo.common.serialize.hessian2.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:89) at org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.encodeRequestData(DubboCodec.java:185) at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:238) at org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:69) at org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:40) at org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:70) at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ... 24 more