ognl.MethodFailedException: Method "execute" failed for object com.toy.action.Test@150c25 [java.lang.NoClassDefFoundError: org/apache/lucene/analysis/standard/StandardAnalyzer]
ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.
ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.
com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.
com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.
ognl.OgnlRuntime.callMethod(OgnlRuntime.
ognl.ASTMethod.getValueBody(ASTMethod.
ognl.SimpleNode.evaluateGetValueBody(SimpleNode.
ognl.SimpleNode.getValue(SimpleNode.
ognl.Ognl.getValue(Ognl.
ognl.Ognl.getValue(Ognl.
com.opensymphony.xwork2.ognl.OgnlUtil$2.execute(OgnlUtil.
com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecute(OgnlUtil.
com.opensymphony.xwork2.ognl.OgnlUtil.getValue(OgnlUtil.
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.DefaultWorkflowIntercept
or.doIntercept(DefaultWorkflowIntercept
or.
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.
org.apache.struts2.interceptor.validation.AnnotationValidationInte
rceptor.doIntercept(AnnotationValidationInte
rceptor.
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.ConversionErrorIntercept
or.intercept(ConversionErrorIntercept
or.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.StaticParametersIntercep
tor.intercept(StaticParametersIntercep
tor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.interceptor.DateTextFieldInterceptor
.intercept(DateTextFieldInterceptor
.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterce
ptor.intercept(ScopedModelDrivenInterce
ptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.interceptor.ServletConfigInterceptor
.intercept(ServletConfigInterceptor
.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
com.opensymphony.xwork2.interceptor.ExceptionMappingIntercep
tor.intercept(ExceptionMappingIntercep
tor.
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteF
ilter.doFilter(StrutsPrepareAndExecuteF
ilter.
root cause
在创建struts2和hibernate框架时遇到的错误,解决的方案就是在工程中引入了lucene-core-5.3.1.jar,
lucene-analyzers-3.6.2.jar和lucene-1.2.jar三个jar包。如果还继续报错,那极大可能是你没有在你的项目添加hibernate\lib\requiredar目录下的jar包。。