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

java.lang.NoSuchMethodError: cn.hutool.core.util.ObjectUtil.defaultIfNull(Ljava/lang/Object;Ljava/util/function/Supplier;) #3453

Closed
yizdream opened this issue Dec 29, 2023 · 2 comments
Labels

Comments

@yizdream
Copy link

yizdream commented Dec 29, 2023

版本情况

JDK版本: Oracle OpenJDK version 1.8 .0_131
hutool版本: 5.2.21-5.2.24(请确保最新尝试是否还有问题)

问题描述(包括截图)

[系统异常]Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: cn.hutool.core.util.ObjectUtil.defaultIfNull(Ljava/lang/Object;Ljava/util/function/Supplier;)Ljava/lang/Object;
报错的地方: return new JSONObject(obj, (JSONConfig)ObjectUtil.defaultIfNull(config, JSONConfig::create));

image

@looly
Copy link
Member

looly commented Dec 29, 2023

请检查是否引入多个版本的Hutool,导致包冲突了。

@looly looly closed this as completed Dec 29, 2023
@looly looly added the question label Dec 29, 2023
@yizdream
Copy link
Author

发现了,确实是有个旧版本的包。

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

No branches or pull requests

2 participants