当前位置: 代码迷 >> J2EE >> org.apache.struts2.json.JSONWriter can not access a member of class org.sp,该如何解决
  详细解决方案

org.apache.struts2.json.JSONWriter can not access a member of class org.sp,该如何解决

热度:418   发布时间:2016-04-22 02:51:42.0
org.apache.struts2.json.JSONWriter can not access a member of class org.sp
struts2中使用spring的AOP,action返回数据时出现这样的错误,不用AOP时没问题
所有的action及后台的类都是在spring里配置的
HTML code
<strong>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"</strong>    <div>    org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:250)    org.apache.struts2.json.JSONWriter.process(JSONWriter.java:164)    org.apache.struts2.json.JSONWriter.value(JSONWriter.java:130)    org.apache.struts2.json.JSONWriter.write(JSONWriter.java:98)    org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:112)


------解决方案--------------------
Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"

楼主可以把相关的代码拿出来看看。
其实上面的异常已经说的很清楚了,你不应该访问TruePointcut这个类你没有访问权限(因为它并不是一个public类型的)
  相关解决方案