Getting while using displaytag lib java.lang.NoClassDefFoundError: org/apache/commons/lang/UnhandledException

柔情痞子 提交于 2019-12-23 05:37:07

问题


Getting the following exception in using displaytag-1.2 jar. I have all the necessary library in WEB-INF/lib folder.

javax.servlet.ServletException:java.lang.NoClassDefFoundError: 
org/apache    commons/lang   /UnhandledException 
org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for
servlet jsp threw exception
java.lang.ClassNotFoundException: org.apache.commons.lang.UnhandledException
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at java.beans.Introspector.instantiate(Unknown Source)
at java.beans.Introspector.findExplicitBeanInfo(Unknown Source)
at java.beans.Introspector.<init>(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.java:3909)
at or

回答1:


I had the same issue. DisplayTag seems to be incompatible with commons-lang-3x. Using commons lang 2.6 should fix the problem.




回答2:


I don't know which application server you're using, but in Glassfish v2, there's sun-web.xml, where we put delegate=false tag to force only the libs from WEB-INF/libs to be seen by the app.



来源:https://stackoverflow.com/questions/17252947/getting-while-using-displaytag-lib-java-lang-noclassdeffounderror-org-apache-co

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!