eclipse 使用 apache.commons.configuration 时无法解决 NestableException
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7891531/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
NestableException cannot be resolved when using apache.commons.configuration
提问by Noam Shaish
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.....
我该如何解决这个问题?他让我配置构建路径,但我真的不知道如何从那里解决这个冲突......
回答by Noam Shaish
Problem solved... had to download the commons-lang-2.4.jar and include in project.
问题解决了...必须下载 commons-lang-2.4.jar 并包含在项目中。
couldnt be more simple than that....
没有比这更简单的了......
回答by Dan The Man
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.
听起来真正需要的是对 PropertiesConfiguration 库的更新,以便它与最新的 lang 库兼容。如果它是一个“免费”库,那么它可能不会出现,考虑到自上次对该线程的回复以来已经有好几年了,而且这种情况仍在发生。我也一直有这个问题,除了前面提到的包含两个 lang libs 之外,还没有找到解决它的方法......这似乎没有任何问题,尽管严格的存储库框架实现(如 Maven)可能有包含两个库的问题。
回答by Krishna Swarup
Had to remove commons-lang3-3.4 from my Java Build Path and added 2.6 , it solved the problem!
不得不从我的 Java 构建路径中删除 commons-lang3-3.4 并添加 2.6 ,它解决了问题!

