使用hessian2无法反序列化jodatime
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
dubbo 3.0.4 jodatime反序列化不了怎么破呢, 有人给点信息么?怎么让jodatime可以反序列化呢?
服务方返回的对象有jodatime的Datetime属性的时候会在消费方报以下错:
com.alibaba.com.caucho.hessian.io.HessianFieldException: org.joda.time.base.BaseDateTime.iChronology: 'org.joda.time.Chronology' could not be instantiated
我又尝试了配置(我查了下scopeModel.getExtensionLoader(type).getSupportedExtensions()只支持compactedjava hessian2 java nativejava)
dubbo.protocol.serialization=java
又会在服务提供方报以下错误
java.io.IOException: Unexpected serialization id:2 received from network, please check if the peer send the right id.
Contributor guide
Research direction
Start by reproducing the Dubbo 3.0.4 Hessian2 response failure with a Joda-Time DateTime property, then compare the provider and consumer serialization settings shown in the report. Done means the response deserializes successfully without the BaseDateTime.iChronology error and without a serialization-id mismatch when the protocol is changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100