Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/ObjectUtils
请教大神:::打印时为什么会找不到文件???怎么解决???Exceptioninthread"main"java.lang.NoClassDefFoundError:or...
请教大神:::打印时为什么会找不到文件???怎么解决???
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/ObjectUtils
at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:166)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.debug(Category.java:260)
at com.mucfc.Test.main(Test.java:14)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.ObjectUtils
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)
... 4 more 展开
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/ObjectUtils
at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:166)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.debug(Category.java:260)
at com.mucfc.Test.main(Test.java:14)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.ObjectUtils
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)
... 4 more 展开
展开全部
很明显啊,少包,log4j还有其它依赖包,你没有导进去.添加一下
看你这错误,少了commons-lang
它还需要commons-logging,slf4j等jar包.也一并导进去吧.
如果你不知道该导哪些,就用最笨的办法,一个个导,少哪个就导哪个.
看你这错误,少了commons-lang
它还需要commons-logging,slf4j等jar包.也一并导进去吧.
如果你不知道该导哪些,就用最笨的办法,一个个导,少哪个就导哪个.
追问
我加了commons-logging,slf4j这两个包,还是错误
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/ObjectUtils
大神能告诉我都有什么包吗?
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询