You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
简要描述您碰到的问题。
dubbo接口抛出自定义的Exception,其中有个变量为List类型的。例如
public class CommonException extends RuntimeException{
Integer code;
String message;
List params;
}
抛出异常信息throw new CommonException(1,"error");
此时params为null。consumer在反序列化CommonException的时候会抛出异常信息:
Caused by: java.lang.NegativeArraySizeException: -1
at com.alibaba.fastjson2.reader.FieldReaderList.readFieldValue(FieldReaderList.java:153)
at com.alibaba.fastjson2.reader.ObjectReaderException.readObject(ObjectReaderException.java:226)
at com.alibaba.fastjson2.reader.ObjectReaderException.readJSONBObject(ObjectReaderException.java:376)
at com.alibaba.fastjson2.JSONB.parseObject(JSONB.java:540)
at org.apache.dubbo.common.serialize.fastjson2.FastJson2ObjectInput.readObject(FastJson2ObjectInput.java:122)
at org.apache.dubbo.common.serialize.fastjson2.FastJson2ObjectInput.readObject(FastJson2ObjectInput.java:106)
at org.apache.dubbo.common.serialize.ObjectInput.readThrowable(ObjectInput.java:73)
环境信息
请填写以下信息:
OS信息: [macOS 13.4]
JDK信息: [JDK17]
版本信息:[FastJson 2.0.43][dubbo 3.2.10]
重现步骤
如何操作可以重现该问题:
抛出自定义的Exception
consumer捕获该异常,在异常反序列化的时候报错。
期待的正确结果
正确反序列化CommonException
相关日志输出
异常堆栈信息在上面已经贴出。
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered:
问题描述
简要描述您碰到的问题。
dubbo接口抛出自定义的Exception,其中有个变量为List类型的。例如
public class CommonException extends RuntimeException{
Integer code;
String message;
List params;
}
抛出异常信息throw new CommonException(1,"error");
此时params为null。consumer在反序列化CommonException的时候会抛出异常信息:
Caused by: java.lang.NegativeArraySizeException: -1
at com.alibaba.fastjson2.reader.FieldReaderList.readFieldValue(FieldReaderList.java:153)
at com.alibaba.fastjson2.reader.ObjectReaderException.readObject(ObjectReaderException.java:226)
at com.alibaba.fastjson2.reader.ObjectReaderException.readJSONBObject(ObjectReaderException.java:376)
at com.alibaba.fastjson2.JSONB.parseObject(JSONB.java:540)
at org.apache.dubbo.common.serialize.fastjson2.FastJson2ObjectInput.readObject(FastJson2ObjectInput.java:122)
at org.apache.dubbo.common.serialize.fastjson2.FastJson2ObjectInput.readObject(FastJson2ObjectInput.java:106)
at org.apache.dubbo.common.serialize.ObjectInput.readThrowable(ObjectInput.java:73)
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
期待的正确结果
正确反序列化CommonException
相关日志输出
异常堆栈信息在上面已经贴出。
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
The text was updated successfully, but these errors were encountered: