Exception occurred during processing request: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException

[org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler] - Exception occurred during processing request: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"
org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"
	at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:246)
	at org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:178)
	at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:168)
	at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:134)
	at org.apache.struts2.json.JSONWriter.write(JSONWriter.java:102)
	at org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:107)
	at org.apache.struts2.json.JSONResult.createJSONString(JSONResult.java:203)
	at org.apache.struts2.json.JSONResult.execute(JSONResult.java:177)
	at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:369)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:273)
	at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:244)
	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)

出现这个错误

[org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler] - Exception occurred during processing request: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"
org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"

是因为你没有正确josn数据的返回视图,在struts2中的配置如下:

<action name="acorder!*" class="orderinfo" method="{1}">
        <result type="json" name="jsonok">
            <param name="root">json</param>
        </result>
        <result type="redirect" name="success">admin/Allfenlei.jsp?iden=orderok</result>
</action>
type应该是json,而参数root的值就是我们的json数组或json对象


爆款云服务器s6 2核4G 低至0.46/天,具体规则查看活动详情Blog Img