java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntim [问题点数:40分,结帖人wangxiaohua_001]

时间:2022-08-02 19:42:31

14:56:10.093 WARN!! Error for /butterfly/plugins/zhonghang/UsefulData/save_usefuldata.bsh
java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at bsh.classpath.ClassManagerImpl.plainClassForName(Unknown Source)
        at bsh.classpath.ClassManagerImpl.classForName(Unknown Source)
        at bsh.NameSpace.classForName(Unknown Source)
        at bsh.NameSpace.getImportedClassImpl(Unknown Source)
        at bsh.NameSpace.getClassImpl(Unknown Source)
        at bsh.NameSpace.getClass(Unknown Source)
        at bsh.Name.toClass(Unknown Source)
        at bsh.BSHAmbiguousName.toClass(Unknown Source)
        at bsh.BSHType.getType(Unknown Source)
        at bsh.BSHTypedVariableDeclaration.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at com.hansky.apps.butterfly.pub.BshServlet.evalScript(BshServlet.java:77)
        at com.hansky.apps.butterfly.pub.BshServlet.service(BshServlet.java:40)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:380
)
        at com.hansky.apps.butterfly.plugin.PluginFilter.doFilter(PluginFilter.java:73)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at com.hansky.apps.butterfly.clientmainform.webhandler.LicenseFilter.doFilter(LicenseFilter.java
:103)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at com.hansky.apps.butterfly.clientmainform.webhandler.LoginFilter.doFilter(LoginFilter.java:215
)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at com.hansky.apps.butterfly.clientmainform.webhandler.ServerMaintainFilter.doFilter(ServerMaint
ainFilter.java:101)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:324)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:535)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
        at org.mortbay.http.HttpServer.service(HttpServer.java:879)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        ... 52 more

14:56:10.093 EVENT  errorPageHandler: init
java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at bsh.classpath.ClassManagerImpl.plainClassForName(Unknown Source)
        at bsh.classpath.ClassManagerImpl.classForName(Unknown Source)
        at bsh.NameSpace.classForName(Unknown Source)
        at bsh.NameSpace.getImportedClassImpl(Unknown Source)
        at bsh.NameSpace.getClassImpl(Unknown Source)
        at bsh.NameSpace.getClass(Unknown Source)
        at bsh.Name.toClass(Unknown Source)
        at bsh.BSHAmbiguousName.toClass(Unknown Source)
        at bsh.BSHType.getType(Unknown Source)
        at bsh.BSHTypedVariableDeclaration.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at bsh.Interpreter.source(Unknown Source)
        at com.hansky.apps.butterfly.pub.BshServlet.evalScript(BshServlet.java:77)
        at com.hansky.apps.butterfly.pub.BshServlet.service(BshServlet.java:40)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:380
)
        at com.hansky.apps.butterfly.plugin.PluginFilter.doFilter(PluginFilter.java:73)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at com.hansky.apps.butterfly.clientmainform.webhandler.LicenseFilter.doFilter(LicenseFilter.java
:103)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at com.hansky.apps.butterfly.clientmainform.webhandler.LoginFilter.doFilter(LoginFilter.java:215
)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at com.hansky.apps.butterfly.clientmainform.webhandler.ServerMaintainFilter.doFilter(ServerMaint
ainFilter.java:101)
        at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:372
)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:324)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:535)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
        at org.mortbay.http.HttpServer.service(HttpServer.java:879)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        ... 52 more

更多1

你想买里面有添加commons-lang这个开源 包没有?

也可能是你使用的commons-lang的版本不正确导致的

我的lang包是2.4版本的,那我用那个版本的不会出这个异常呢!
引用 5 楼 ioe_gaoyong 的回复:

你用的lang版本是多少的,从报错来看你很可能用的commons-lang3而 异常需要的包是commons-lang1的包

也就是你代码里面实际上有用到org/apache/commons/lang/exception/这个包下面的异常类,在commons-lang3里面好像是org/apache/commons/lang3 ,线索就只能提到这里了