使用 apache.commons.configuration 时无法解决 NestableException

发布于 2024-12-11 13:40:53 字数 460 浏览 1 评论 0原文

我使用以下:

import java.util.Collections;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.configuration.XMLConfiguration;

我得到:

The type org.apache.commons.lang.exception.NestableException cannot be resolved. It is indirectly referenced from required .class files

我使用 eclipse...

我该如何解决这个问题?他为我提供了配置构建路径,但我真的不知道如何从那里解决这个冲突......

Im using the following:

import java.util.Collections;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.configuration.XMLConfiguration;

and i get:

The type org.apache.commons.lang.exception.NestableException cannot be resolved. It is indirectly referenced from required .class files

Im using eclipse...

how can i resolve this? he offers me to Configure build path but i dont really know how to solve this collision from there.....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦里南柯 2024-12-18 13:40:53

问题解决了...
必须下载 commons-lang-2.4.jar 并包含在项目中。

简单得不能再简单了......

Problem solved...
had to download the commons-lang-2.4.jar and include in project.

couldnt be more simple than that....

记忆で 2024-12-18 13:40:53

听起来真正需要的是对 PropertiesConfiguration 库的更新,以便它与最新的 lang 库兼容。如果它是一个“免费”库,那么它可能不会出现,考虑到距离上次回复该线程已经好几年了,而且这种情况仍在发生。
我也一直遇到这个问题,除了前面提到的包含两个 lang libs 之外,还没有找到解决它的方法...这似乎没有出现任何问题,尽管严格的存储库框架实现(如 Maven)可能有包含的两个库都有问题。

Sounds like what is really needed is an update to the PropertiesConfiguration lib so that it gets along with latest lang lib. If its a "free" lib then it might not be coming, considering that its been years since last reply on this thread and this is still happening.
I have been having this issue as well, and have not found a way of resolving it apart from the aforementioned inclusion of both lang libs ... which does not seem to present any problems, though strict repository framework implementations (like Maven) might have problems with both libs included.

风情万种。 2024-12-18 13:40:53

必须从我的 Java 构建路径中删除 commons-lang3-3.4 并添加 2.6 ,它解决了问题!

Had to remove commons-lang3-3.4 from my Java Build Path and added 2.6 , it solved the problem!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文