-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]dubbo3.2.11序列化异常 #2392
Comments
@wenshao 现在有什么办法可以临时解决一下吗,虽然没有上生产,但是最近需要频繁使用 |
看kotlin的源码是jdk9以上就删除了newInstance这个方法 |
Class<?> clazz = Class.forName("kotlin.collections.EmptyList");
Constructor<?> constructor = clazz.getDeclaredConstructor();
constructor.setAccessible(true);
Object object = constructor.newInstance();
byte[] bytes = JSONB.toBytes(object, JSONWriter.Feature.WriteClassName);
Object parsed = JSONB.parseObject(bytes, Object.class); 这个是我是能跑过的 |
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.49-SNAPSHOT/ |
版本2.0.50再次出现,回退到2.0.49依旧解决不了 |
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson/2.0.51-SNAPSHOT/ |
问题描述
简要描述您碰到的问题。
java.io.IOException: org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: create instance error class kotlin.collections.EmptyList, offset 3676
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
1.provider lang java
2.consumer lang kotlin
3.混合定义一个实体,比如class Mix{ kotlin class A a, Java class B b}
The text was updated successfully, but these errors were encountered: