[BUG]NoClassDefFoundError: Failed resolution of: Ljava/time/ZoneId
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 问题描述
将Java对象序列化为JSON时,出现以下错误
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/ZoneId;
at com.alibaba.fastjson2.JSONWriter$Context.(JSONWriter.java:1142)
at com.alibaba.fastjson2.JSON$-CC.toJSONString(JSON.java:2004)
但是使用1.1.72.android就不会出现任何错误
### 环境信息
- OS信息: [android 5.1.1]
- JDK信息: [e.g.:Openjdk 11.0.13]
- 版本信息:[e.g.:Fastjson2 2.0.16.android]
Contributor guide
Research direction
Start by reproducing the failure on Android 5.1.1 with Fastjson2 2.0.16.android and compare it with 1.1.72.android. Read the static initialization path at JSONWriter.Context. in JSONWriter.java and the call from JSON.java; done means serialization no longer raises the ZoneId NoClassDefFoundError on the reported environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100