调用JSONArray.fromObject(stss)出现java.lang.reflect.InvocationTargetException错误

java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher

net.sf.json.util.JSONTokener.nextValue(JSONTokener.java:355)

net.sf.json.JSONArray._fromJSONTokener(JSONArray.java:917)

net.sf.json.JSONArray._fromString(JSONArray.java:983)

net.sf.json.JSONArray.fromObject(JSONArray.java:141)

net.sf.json.JSONArray.fromObject(JSONArray.java:120)

clientwebaction.DataAction.dataView(DataAction.java:163)

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

java.lang.reflect.Method.invoke(Method.java:597)

com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)

com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)

com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)

org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)

org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)


少了ezmorph 1.0.6包

使用json-lib.jar包,以下的包是必须的:

jakarta commons-lang 2.5

jakarta commons-beanutils 1.8.0

jakarta commons-collections 3.2.1

jakarta commons-logging 1.1.1


ezmorph 1.0.6