alibaba / alibaba/fastjson2

[BUG] java.lang.BootstrapMethodError: bootstrap method initialization exception

Open
#3,835 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

### 问题描述
线上一个容器pod成功启动后(java应用启动成功),但是处理请求时一直报BootstrapMethodError错误
java.lang.BootstrapMethodError: bootstrap method initialization exception
at com.alibaba.fastjson2.reader.ObjectReaderCreator.createFieldReaders(ObjectReaderCreator.java:1683)
at com.alibaba.fastjson2.reader.ObjectReaderCreatorASM.createObjectReader(ObjectReaderCreatorASM.java:229)
at com.alibaba.fastjson2.reader.ObjectReaderProvider.getObjectReaderInternal(ObjectReaderProvider.java:845)
at com.alibaba.fastjson2.reader.ObjectReaderProvider.getObjectReader(ObjectReaderProvider.java:763)
at com.alibaba.fastjson2.JSON.parseObject(JSON.java:858)

### 环境信息
- OS信息: [5.10.233-223.887.amzn2.x86_64]
- JDK信息: [OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode, sharing)]
- 版本信息:[fastjson2-2.0.53.jar]

### 重现步骤
不可复现,原因是只有扩容pod时才可能出现这个问题,不是必现,但只要出现了,这个pod处理就一直报错。
```

### 期待的正确结果
反序列化成功

### 相关日志输出
如问题描述

#### 附加信息

Contributor guide

Open the contributing guide

Research direction

Start by reading ObjectReaderCreator.java:1683, ObjectReaderCreatorASM.java:229, ObjectReaderProvider.java:845 and JSON.java:858, then investigate the failure on JDK 21 with fastjson2-2.0.53. Since the report is not reproducible and only occurs during pod scaling, establish a reliable test or diagnostic case first; done means identifying the cause and making deserialization succeed for that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.