fungoddd opened a new issue, #11911: URL: https://github.com/apache/dubbo/issues/11911
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy --> - [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. ### Environment * Dubbo version: 3.1.8 * Operating System version: macOS 13.2.1 * Java version: 1.8.0_341 ### Steps to reproduce this issue 1. 消费者 ``` @DubboReference(methods = { @org.apache.dubbo.config.annotation.Method( name = "addLog", async = true, sent = false, isReturn = false )} ) private SysLogAsyncRpcService sysLogAsyncRpcService; // Dubbo异步调用 sysLogAsyncRpcService.addLog(sysLog); ``` 2. 提供者 ``` @Service @DubboService(async = true, interfaceClass = SysLogAsyncRpcService.class) public class SysLogAsyncServiceImpl implements SysLogAsyncService { @Autowired private SysLogService sysLogService; @Override public void addLog(SysLog sysLog) { sysLogService.addLog(sysLog); } } ``` ### Expected Behavior 我在Dubbo 2.7.x 版本使用同样的方式调用不会产生错误日志 ### Actual Behavior 当消费端使用Dubbo异步调用时,调用成功,但是会产生序列化错误 If there is an exception, please attach the exception trace: ``` 2023-03-24 14:00:51.766 ERROR 30378 --- [andler-thread-2] o.a.d.r.p.i.DefaultParamDeepCopyUtil : [DUBBO] Unable to deep copy parameter to target class., dubbo version: 3.1.8, current host: 192.168.10.175, error code: 4-6. This may be caused by , go to https://dubbo.apache.org/faq/4/6 to find instructions. java.lang.RuntimeException: [Serialization Security] Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface. Current mode is strict check, will disallow to deserialize it by default. Java field: private java.util.concurrent.CompletableFuture org.apache.dubbo.rpc.AsyncRpcResult.responseFuture at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:304) ~[dubbo-3.1.8.jar:3.1.8] at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeInstance(JavaSerializer.java:284) ~[dubbo-3.1.8.jar:3.1.8] at com.alibaba.com.caucho.hessian.io.JavaSerializer.writeObject(JavaSerializer.java:251) ~[dubbo-3.1.8.jar:3.1.8] at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:412) ~[dubbo-3.1.8.jar:3.1.8] at org.apache.dubbo.common.serialize.hessian2.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:99) ~[dubbo-3.1.8.jar:3.1.8] at org.apache.dubbo.rpc.protocol.injvm.DefaultParamDeepCopyUtil.copy(DefaultParamDeepCopyUtil.java:47) ~[dubbo-3.1.8.jar:3.1.8] at org.apache.dubbo.rpc.protocol.injvm.InjvmInvoker.rebuildValue(InjvmInvoker.java:261) [dubbo-3.1.8.jar:3.1.8] at org.apache.dubbo.rpc.protocol.injvm.InjvmInvoker.lambda$doInvoke$0(InjvmInvoker.java:129) [dubbo-3.1.8.jar:3.1.8] at java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1604) ~[na:1.8.0_341] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java) ~[na:1.8.0_341] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_341] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_341] at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) ~[dubbo-3.1.8.jar:3.1.8] at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_341] Caused by: java.lang.IllegalArgumentException: [Serialization Security] Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface. Current mode is strict check, will disallow to deserialize it by default. at org.apache.dubbo.common.utils.DefaultSerializeClassChecker.loadClass(DefaultSerializeClassChecker.java:112) ~[dubbo-3.1.8.jar:3.1.8] at org.apache.dubbo.common.serialize.hessian2.Hessian2SerializerFactory.getDefaultSerializer(Hessian2SerializerFactory.java:49) ~[dubbo-3.1.8.jar:3.1.8] at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:393) ~[dubbo-3.1.8.jar:3.1.8] at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:411) ~[dubbo-3.1.8.jar:3.1.8] at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:302) ~[dubbo-3.1.8.jar:3.1.8] ... 13 common frames omitted ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
