包结构图:
报错:
struts.xml
OGNLAction中有execute()方法:
可是问题是,总是找不到该方法是为什么啊?究竟是哪里错了啊?
execute方法返回值呢
把方法定义贴出来
已经贴出来,你看出来哪里有问题了吗publicStringexecute()throwsException这是Strutsdebug的信息,你是指这个吗?
不是这个是java报的异常堆栈那要怎么看,这个错误是在点击“注册”之后进行页面跳转的时候报的错误,无法进行debug。而且我再OGNLAction.java中打断点的时候,也没有执行到,我无法用debug的方式去查看堆栈信息,请问下怎么去看堆栈信息??
这个的全部信息
贴出来了,麻烦您帮我看看是什么原因呀? java.lang.NoSuchMethodException:ognl.OGNLAction.execute()ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1246)ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:117)com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:108)ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1369)ognl.ASTMethod.getValueBody(ASTMethod.java:90)ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)ognl.SimpleNode.getValue(SimpleNode.java:258)ognl.Ognl.getValue(Ognl.java:494)ognl.Ognl.getValue(Ognl.java:458)com.opensymphony.xwork2.ognl.OgnlUtil$2.execute(OgnlUtil.java:309)com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.java:340)com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.java:307)com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:423)com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:287)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:250)org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:76)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:229)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)org.apache.struts2.interceptor.DateTextFieldInterceptor.intercept(DateTextFieldInterceptor.java:125)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:253)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564)org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)java.lang.Thread.run(Thread.java:744)
1.你在action里的进入和离开的时候加个trycatch.,catch输出下log
2.你的action继承struts的actionsupport了么?...
3.包名真逗.换个不行?
4.execute里面写的太逗了...
5.如果用注解就简单多了.哇嘎嘎.
还是不行版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。