Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/Nestabl

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/mqs1990/article/details/76167679

1、出现Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException异常,详情见下图:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
 at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 at com.manqingsong.test.user.factory.Test.main(Test.java:9)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 ... 13 more

2、代码:

所导的包:


很明显,缺少org/apache/commons/lang/exception/NestableRuntimeException,故还需要导包:commons-lang-2.3.jar

添加该jar包,如下图:

但还是报错,如下图:

但是同样报错,缺少相关jar包,导入:ezmorph-1.0.3.jar包

但还是报错,如下:

已上图,可以看出,缺少两个包:commons-beanutils-1.7.0.jar以及commons-collections-3.2.1.jar包,导入该两个包:


运行结果如下,OK没问题


展开阅读全文

没有更多推荐了,返回首页