本文介绍了运行struts 2应用程序时异常会引发。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 运行我的struts web应用程序时出现此错误。 即使我在类路径中添加了所有必需的jar文件仍然会收到此错误。请帮助我.... HTTP ERROR 500 访问/Strutsproj/Index.jsp时出现问题。原因: com / opensymphony / xwork2 / util / ValueStack 引起: java.lang.NoClassDefFoundError:com / opensymphony / xwork2 / util / ValueStack at java.lang.Class.getDeclaredMethods0(Native Method) at java。 lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetPublicMethods(Unknown Source) at java.lang.Class.getMethods(Unknown Source) 在java.beans.Introspector.getPublicDeclaredMethods(未知来源) 在java.beans.Introspector.getTargetMethodInfo(未知来源) 在java。 beans.Introspector.getBeanInfo(Unknown Source) at java.beans.Introspector.getBeanInfo(Unknown Source) at java.beans.Introspector.getBeanInfo(Unknown Source) 在java.beans.Introspector。< init>(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector.getBeanInf中o(未知来源) 在java.beans.Introspector。< init>(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector。< init>(未知来源) at java.beans.Introspector.getBeanInfo(未知来源) at java.beans.Introspector.getBeanInfo(Unknown Source) at java.beans.Introspector。< init> (未知来源) at java.beans.Introspector.getBeanInfo(未知来源) at org.apache.jasper.runtime.JspRuntimeLibrary.getWriteMethod(JspRuntimeLibrary.java:799 ) org.apache.jasper.compiler.Validator $ ValidateVisitor.checkSetter(Validator.java:1031) at org.apache.jasper.compiler.Validator $ ValidateVisitor .checkXmlAttributes(Validator.java:1112) at org.apache.jasper.compiler.Validator $ ValidateVisitor.visit(Validator.java:834) at org.apache .jasper.compi ler.Node $ CustomTag.accept(Node.java:1482) org.apache.jasper.compiler.Node $ Nodes.visit(Node.java:2257) org.apache.jasper.compiler.Node $ Visitor.visitBody(Node.java:2307) org.apache.jasper.compiler.Node $ Visitor.visit(Node.java:2313 ) org.apache.jasper.compiler.Node $ Root.accept(Node.java:481) at org.apache.jasper.compiler.Node $ Nodes .visit(Node.java:2257) at org.apache.jasper.compiler.Validator.validate(Validator.java:1837) at org.apache.jasper .compiler.Compiler.generateJava(Compiler.java:195) org.apache.jasper.compiler.Compiler.compile(Compiler.java:409) at org .apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344) 在org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470) org.apache.jasper.servlet.JspServlet.ser副(JspServlet.java:364) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet。 ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay。 jetty.security.SecurityHandler.handle(SecurityHandler.java:216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection $ RequestHandler.headerComplete(HttpConnection.java:928) at org.mortbay.jet ty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay。 jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org。 mortbay.thread.QueuedThreadPool $ PoolThread.run(QueuedThreadPool.java:582) 引起:java.lang.ClassNotFoundException:com.opensymphony.xwork2.util.ValueStack at java.net.URLClassLoader $ 1.run(Unknown Source) at java.net.URLClassLoader $ 1.run(Unknown Source) at java.security.AccessController.doPrivileged (原生方法) at java.net.URLClassLoader.findClass(Unknown Source) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392 ) at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:89) ... 53更多 引起: java .lang.ClassNotFoundException:com.opensymphony.xwork2.util.ValueStack at java.net.URLClassLoader $ 1.run(Unknown Source) at java.net.URLClassLoader $ 1 .run(未知来源) 在java.security.AccessController.doPrivileged(原生方法) 在java.net.URLClassLoader.findClass(未知来源) at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392) at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:89) 在java.lang.Class.getDeclaredMethods0(本机方法) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetPublicMethods (未知来源) at java.lang.Class.getMethods(Unknown Source) at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source) 在java.beans.Introspector.getTargetMethodInfo(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java .beans.Introspector。< init>(未知来源) at java.beans.Introspector.getBeanInfo(Unknown Source) at java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector。< init>(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector.getBeanInfo(未知来源) 在java.beans.Introspector。< init>(未知来源) 在java。 beans.Introspector.getBeanInfo(Unknown Source) at java.beans.Introspector.getBeanInfo(Unknown Source) at java.beans.Introspector。< init>(Unknown来源) 在java.beans.Introspector.getBeanInfo(未知来源) at org.apache.jasper.runtime.JspRuntimeLibrary.getWriteMethod(JspRuntimeLibrary.java:799) che.jasper.compiler.Validator $ ValidateVisitor.checkSetter(Validator.java:1031) org.apache.jasper.compiler.Validator $ ValidateVisitor.checkXmlAttributes(Validator.java:1112) at org.apache.jasper.compiler.Validator $ ValidateVisitor.visit(Validator.java:834) at org.apache.jasper.compiler.Node $ CustomTag.accept(Node .java:1482) org.apache.jasper.compiler.Node $ Nodes.visit(Node.java:2257) org.apache.jasper.compiler .Node $ Visitor.visitBody(Node.java:2307) org.apache.jasper.compiler.Node $ Visitor.visit(Node.java:2313) at org.apache.jasper.compiler.Node $ Root.accept(Node.java:481) org.apache.jasper.compiler.Node $ Nodes.visit(Node.java:2257) org.apache.jasper.compiler.Validator.validate(Validator.java:1837) at org.apache.jasper.compiler.Compiler.generateJava(Compiler。 java:195) org.apache.jasper.compiler.Compiler.compile(Compiler.java:409) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java :216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle (ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler .HandlerWrapp er.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) org.mortbay.jetty。 HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection $ RequestHandler.headerComplete(HttpConnection.java:928) at org.mortbay。 jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay。 jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org。 mortbay.thread.QueuedThreadPool $ PoolThread.run(QueuedThreadPool.java:582) 由Jetty提供支持://i am getting this error while running my struts web application.And even i added all required jar files in class path still getting this error.please help me ....HTTP ERROR 500Problem accessing /Strutsproj/Index.jsp. Reason: com/opensymphony/xwork2/util/ValueStackCaused by:java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/ValueStackat java.lang.Class.getDeclaredMethods0(Native Method)at java.lang.Class.privateGetDeclaredMethods(Unknown Source)at java.lang.Class.privateGetPublicMethods(Unknown Source)at java.lang.Class.getMethods(Unknown Source)at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)at java.beans.Introspector.getTargetMethodInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at org.apache.jasper.runtime.JspRuntimeLibrary.getWriteMethod(JspRuntimeLibrary.java:799)at org.apache.jasper.compiler.Validator$ValidateVisitor.checkSetter(Validator.java:1031)at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1112)at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:834)at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2313)at org.apache.jasper.compiler.Node$Root.accept(Node.java:481)at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)at org.apache.jasper.compiler.Validator.validate(Validator.java:1837)at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:195)at org.apache.jasper.compiler.Compiler.compile(Compiler.java:409)at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)at org.mortbay.jetty.Server.handle(Server.java:326)at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.ValueStackat java.net.URLClassLoader$1.run(Unknown Source)at java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(Unknown Source)at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:89)... 53 moreCaused by:java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.ValueStackat java.net.URLClassLoader$1.run(Unknown Source)at java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(Unknown Source)at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)at runjettyrun.ProjectClassLoader.loadClass(ProjectClassLoader.java:89)at java.lang.Class.getDeclaredMethods0(Native Method)at java.lang.Class.privateGetDeclaredMethods(Unknown Source)at java.lang.Class.privateGetPublicMethods(Unknown Source)at java.lang.Class.getMethods(Unknown Source)at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)at java.beans.Introspector.getTargetMethodInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at java.beans.Introspector.<init>(Unknown Source)at java.beans.Introspector.getBeanInfo(Unknown Source)at org.apache.jasper.runtime.JspRuntimeLibrary.getWriteMethod(JspRuntimeLibrary.java:799)at org.apache.jasper.compiler.Validator$ValidateVisitor.checkSetter(Validator.java:1031)at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1112)at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:834)at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1482)at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2307)at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2313)at org.apache.jasper.compiler.Node$Root.accept(Node.java:481)at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2257)at org.apache.jasper.compiler.Validator.validate(Validator.java:1837)at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:195)at org.apache.jasper.compiler.Compiler.compile(Compiler.java:409)at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)at org.mortbay.jetty.Server.handle(Server.java:326)at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)Powered by Jetty://推荐答案 ValidateVisitor.checkSetter (Validator.java:1031) org.apache.jasper.compiler.ValidatorValidateVisitor.checkSetter(Validator.java:1031)at org.apache.jasper.compiler.Validator ValidateVisitor.checkXmlAttributes(Validator.java:1112)在org.apac上 he.jasper.compiler.ValidatorValidateVisitor.checkXmlAttributes(Validator.java:1112)at org.apache.jasper.compiler.Validator ValidateVisitor.visit(Validator.java:834) at org.apache.jasper.compiler.NodeValidateVisitor.visit(Validator.java:834)at org.apache.jasper.compiler.Node 这篇关于运行struts 2应用程序时异常会引发。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-06 09:04