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
出现 Caused by: java.lang.InstantiationException: java.util.Arrays$ArrayList at java.lang.Class.newInstance(Class.java:427) at com.alibaba.fastjson2.reader.FieldReaderListStrMethod.readFieldValue(FieldReaderListStrMethod.java:54) ... 49 more Caused by: java.lang.NoSuchMethodException: java.util.Arrays$ArrayList.<init>() at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.newInstance(Class.java:412) ... 50 more 错误
期待的正确结果
对您期望发生的结果进行清晰简洁的描述。
相关日志输出
请复制并粘贴任何相关的日志输出。
org.springframework.data.redis.serializer.SerializationException: Could not deserialize: create instance error class java.util.Arrays$ArrayList; nested exception is com.alibaba.fastjson2.JSONException: create instance error class java.util.Arrays$ArrayList
问题描述
java.util.Arrays$ArrayList反序列化失败。
重现步骤
如何操作可以重现该问题:
Arrays.asList("cacheObject", "cacheObject2", "cacheObject3")
数据Caused by: java.lang.InstantiationException: java.util.Arrays$ArrayList at java.lang.Class.newInstance(Class.java:427) at com.alibaba.fastjson2.reader.FieldReaderListStrMethod.readFieldValue(FieldReaderListStrMethod.java:54) ... 49 more Caused by: java.lang.NoSuchMethodException: java.util.Arrays$ArrayList.<init>() at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.newInstance(Class.java:412) ... 50 more
错误期待的正确结果
对您期望发生的结果进行清晰简洁的描述。
相关日志输出
请复制并粘贴任何相关的日志输出。
org.springframework.data.redis.serializer.SerializationException: Could not deserialize: create instance error class java.util.Arrays$ArrayList; nested exception is com.alibaba.fastjson2.JSONException: create instance error class java.util.Arrays$ArrayList
附加信息
修改了FieldReaderListStrMethod源码解决了这个问题,增加了listType == ObjectReaderImplList.CLASS_ARRAYS_LIST
The text was updated successfully, but these errors were encountered: