Skip to content

[BUG] 在agent包里使用JSON.toJSONString()报异常 #3555

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

Open
luoyh opened this issue May 14, 2025 · 0 comments
Open

[BUG] 在agent包里使用JSON.toJSONString()报异常 #3555

luoyh opened this issue May 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@luoyh
Copy link

luoyh commented May 14, 2025

问题描述

在agent包里使用JSON.toJSONString()报异常 :
Could not initialize class com.alibaba.fastjson2.JSONFactory

环境信息

  • JDK信息:openjdk21
  • 版本信息:fastjson2-2.0.53

重现步骤

写一个agent项目, 依赖加入fastjson2-2.0.53, 然后打包(使用maven-shade-plugin重命名或者不重命令都一样的问题).
在其他工程使用-javaagent:此包启动, 然后在JSON.toJSONString()方法报上面的异常.
使用gson或者jackson正常.

@luoyh luoyh added the bug Something isn't working label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant