dubbo version: 3.1.7, 异步调用 异常
- Dominant language
- CSS
- Stars
- 491
- Forks
- 809
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 6
Description
dubbo version: 3.1.7,
```
public R test( ) throws ExecutionException, InterruptedException {
CompletableFuture future = RpcContext.getServiceContext().asyncCall(
() -> {
return asyncService.sayHello("oneway call request1");
}
);
return toAjax(future.get() != null);
}
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)
at org.apache.dubbo.common.serialize.hessian2.Hessian2SerializerFactory.getDefaultSerializer(Hessian2SerializerFactory.java:49)
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:393)
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:411)
at com.alibaba.com.caucho.hessian.io.JavaSerializer$FieldSerializer.serialize(JavaSerializer.java:302)
... 12 common frames omitted
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reported RpcContext.getServiceContext().asyncCall usage and the CompletableFuture serialization exception. Read DefaultSerializeClassChecker.java and Hessian2SerializerFactory.java to trace the failure, then establish whether the documented async-call behavior and serialization handling match the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100