Skip to content
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

3.2 升级至 3.3 Hessian 与 Springboot 的问题 #3077

Open
tmtbe opened this issue Dec 12, 2024 · 1 comment
Open

3.2 升级至 3.3 Hessian 与 Springboot 的问题 #3077

tmtbe opened this issue Dec 12, 2024 · 1 comment

Comments

@tmtbe
Copy link

tmtbe commented Dec 12, 2024

Srpingboot 版本3.3.5 dubbo 3.3.1
通过 gradle buildJar打成 jar 包后运行序列化会报错,疑似 META-INF 中的 dubbo/hessian/serializers 没有注册成功

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.time.LocalDate java.time.LocalDateTime.date accessible: module java.base does not "opens java.time" to unnamed module @31c88ec8
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:388) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:364) ~[na:na]
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:312) ~[na:na]
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183) ~[na:na]
at java.base/java.lang.reflect.Field.setAccessible(Field.java:177) ~[na:na]
at com.alibaba.com.caucho.hessian.io.JavaSerializer.introspect(JavaSerializer.java:170) ~[hessian-lite-4.0.3.jar!/:4.0.3]
at com.alibaba.com.caucho.hessian.io.JavaSerializer.(JavaSerializer.java:81) ~[hessian-lite-4.0.3.jar!/:4.0.3]
at com.alibaba.com.caucho.hessian.io.JavaSerializer.create(JavaSerializer.java:100) ~[hessian-lite-4.0.3.jar!/:4.0.3]
at org.apache.dubbo.common.serialize.hessian2.Hessian2SerializerFactory.getDefaultSerializer(Hessian2SerializerFactory.java:61) ~[dubbo-3.3.1.jar!/:3.3.1]
at com.alibaba.com.caucho.hessian.io.SerializerFactory.loadSerializer(SerializerFactory.java:387) ~[hessian-lite-4.0.3.jar!/:4.0.3]
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:333) ~[hessian-lite-4.0.3.jar!/:4.0.3]
at com.alibaba.com.caucho.hessian.io.SerializerFactory.getObjectSerializer(SerializerFactory.java:284) ~[hessian-lite-4.0.3.jar!/:4.0.3]
at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:434) ~[hessian-lite-4.0.3.jar!/:4.0.3]
at com.alibaba.com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:302) ~[hessian-lite-4.0.3.jar!/:4.0.3]
... 66 common frames omitted

但是用 gradle bootRun 不会报错,怀疑打包成 fatjar 后出现的问题

@AlbumenJ
Copy link
Member

解压一下jar包看里面的数据看一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants