luo-zhan opened a new issue, #14668:
URL: https://github.com/apache/dubbo/issues/14668

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   dubbo 3.0.11
   jdk 1.8
   mac 14.2
   
   ### Steps to reproduce this issue
   
   When provider throw a custom exception, then consumer get a exception :
   
   
   ```
   org.apache.dubbo.rpc.RpcException: Failfast invoke providers 
DefaultServiceInstance{serviceName='bss-security-service', host='10.73.195.73', 
....}, cause: org.apache.dubbo.remoting.RemotingException: 
com.alibaba.com.caucho.hessian.io.HessianFieldException: 
java.lang.Throwable.suppressedExceptions: java.util.ArrayList cannot be 
assigned to 'java.util.List'
   com.alibaba.com.caucho.hessian.io.HessianFieldException: 
java.lang.Throwable.suppressedExceptions: java.util.ArrayList cannot be 
assigned to 'java.util.List'
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.logDeserializeError(JavaDeserializer.java:172)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer.deserialize(JavaDeserializer.java:534)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:277)
        ...
   Caused by: java.lang.IllegalAccessException: class 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer 
cannot access a member of class java.lang.Throwable (in module java.base) with 
modifiers "private"
        at 
java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:394)
        at 
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
        at java.base/java.lang.reflect.Field.checkAccess(Field.java:1140)
        at java.base/java.lang.reflect.Field.set(Field.java:817)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer.deserialize(JavaDeserializer.java:532)
        ... 81 more
   
   Caused by: java.util.concurrent.ExecutionException: 
org.apache.dubbo.remoting.RemotingException: 
com.alibaba.com.caucho.hessian.io.HessianFieldException: 
java.lang.Throwable.suppressedExceptions: java.util.ArrayList cannot be 
assigned to 'java.util.List'
   com.alibaba.com.caucho.hessian.io.HessianFieldException: 
java.lang.Throwable.suppressedExceptions: java.util.ArrayList cannot be 
assigned to 'java.util.List'
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.logDeserializeError(JavaDeserializer.java:172)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer.deserialize(JavaDeserializer.java:534)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:277)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:204)
        at 
com.alibaba.com.caucho.hessian.io.SerializerFactory.readObject(SerializerFactory.java:548)
   ...
   Caused by: java.lang.IllegalAccessException: class 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer 
cannot access a member of class java.lang.Throwable (in module java.base) with 
modifiers "private"
        at 
java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:394)
        at 
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
        at java.base/java.lang.reflect.Field.checkAccess(Field.java:1140)
        at java.base/java.lang.reflect.Field.set(Field.java:817)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer.deserialize(JavaDeserializer.java:532)
        ...
   Caused by: org.apache.dubbo.remoting.RemotingException: 
com.alibaba.com.caucho.hessian.io.HessianFieldException: 
java.lang.Throwable.suppressedExceptions: java.util.ArrayList cannot be 
assigned to 'java.util.List'
   com.alibaba.com.caucho.hessian.io.HessianFieldException: 
java.lang.Throwable.suppressedExceptions: java.util.ArrayList cannot be 
assigned to 'java.util.List'
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.logDeserializeError(JavaDeserializer.java:172)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer.deserialize(JavaDeserializer.java:534)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:277)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer.readObject(JavaDeserializer.java:204)
        at 
com.alibaba.com.caucho.hessian.io.SerializerFactory.readObject(SerializerFactory.java:548)
        at 
com.alibaba.com.caucho.hessian.io.Hessian2Input.readObjectInstance(Hessian2Input.java:2850)
   ...
   Caused by: java.lang.IllegalAccessException: class 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer 
cannot access a member of class java.lang.Throwable (in module java.base) with 
modifiers "private"
        at 
java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:394)
        at 
java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
        at java.base/java.lang.reflect.Field.checkAccess(Field.java:1140)
        at java.base/java.lang.reflect.Field.set(Field.java:817)
        at 
com.alibaba.com.caucho.hessian.io.JavaDeserializer$ObjectListFieldDeserializer.deserialize(JavaDeserializer.java:532)
        ... 81 more
   
   
   ```
   
   ### What you expected to happen
   
   A right exception or tips.
   
   ### Anything else
   
   dubbo service method:
    BaseResponseDTO<Boolean> changeSecurityStatus(Integer market, String 
securityCode, Integer securityStatus);
    
   consumer throws custom exception:
   ```java
   package com.hst.arch.components.exception.types;
   
   import com.hst.arch.components.exception.AbstractHSTBaseException;
   
   public class HSTAlertingBaseException extends AbstractHSTBaseException {
       public HSTAlertingBaseException(String code, String msg, Object... args) 
{
           super(code, msg, args);
       }
   }
   ```
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to