问题描述
StacktracesUnabletoinstantiateAction,listUserAction,definedfor'listUser'innamespace'/'listUserActioncom.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:307)com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:388)com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:187)org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)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:128)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)java.lang.Thread.run(Thread.java:619)java.lang.ClassNotFoundException:listUserActionorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:146)com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:96)com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:212)com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:132)com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:139)com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:109)com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:288)com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:388)com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:187)org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)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:128)org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)java.lang.Thread.run(Thread.java:619)
解决方案
解决方案二:
java.lang.ClassNotFoundException:listUserAction未找到listUserAction的定义,楼主仔细检查下配置文件,看是不是哪里配置错误或者忘记配置了