首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

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

2012-02-09 
org.apache.struts2.json.JSONWriter can not access a member of class org.spstruts2中使用spring的AOP,

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类型的)

热点排行