You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "fungoddd (via GitHub)" <gi...@apache.org> on 2023/03/24 06:25:29 UTC

[GitHub] [dubbo] fungoddd opened a new issue, #11911: 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface

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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface [dubbo]

Posted by "Abelicer (via GitHub)" <gi...@apache.org>.
Abelicer commented on issue #11911:
URL: https://github.com/apache/dubbo/issues/11911#issuecomment-1765999060

   修改序列化校验的配置:dubbo.application.serialize-check-status=WARN
   参考文档:
   https://cn.dubbo.apache.org/zh-cn/overview/mannual/java-sdk/advanced-features-and-usage/security/class-check/


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] Oliver-242 commented on issue #11911: 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface

Posted by "Oliver-242 (via GitHub)" <gi...@apache.org>.
Oliver-242 commented on issue #11911:
URL: https://github.com/apache/dubbo/issues/11911#issuecomment-1704063091

   我也是类似问题,还没解决吗
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #11911: 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11911:
URL: https://github.com/apache/dubbo/issues/11911#issuecomment-1515872265

   这个应该是本地调用的时候参数复制的问题,需要修复下


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] SunSmileAZY commented on issue #11911: 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface

Posted by "SunSmileAZY (via GitHub)" <gi...@apache.org>.
SunSmileAZY commented on issue #11911:
URL: https://github.com/apache/dubbo/issues/11911#issuecomment-1510135108

   看下序列化方式,如果是hessian 则需要实现Serializable。 可以修改序列化方式或者对象实现Serializable


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #11911: 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11911:
URL: https://github.com/apache/dubbo/issues/11911#issuecomment-1705892207

   > 我也是类似问题,还没解决吗
   
   Already fixed in 3.2.6. Releasing...


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface [dubbo]

Posted by "CrazyHZM (via GitHub)" <gi...@apache.org>.
CrazyHZM closed issue #11911: 异步调用错误:Serialized class java.util.concurrent.CompletableFuture has not implement Serializable interface
URL: https://github.com/apache/dubbo/issues/11911


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org