struts2中使用spring的AOP,action返回数据时出现这样的错误,不用AOP时没问题
所有的action及后台的类都是在spring里配置的
<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)
所有的action及后台的类都是在spring里配置的
<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)
解决方案 »
- sessionFactory问题
- POI 3.7合并多个Excel文件问题
- hibernate HQL内联问题 急
- 如何实现jar包的自动下载运行?
- 急!!!关闭OracleCachedRowSet的问题。
- linux下安装j2sdk的问题
- 请问哪里有Jcreator pro3.0 的注册码
- struts的问题
- 数据库记录改变能否触发程序执行一个操作?
- java连接oracle字符串问题
- 我们爱分享----俄罗斯方块源码(一分钟copy到机器上试玩下)
- 编辑jsp时候出现的错误cannot convert from java.sql.Statement to java.beans.Statement
其实上面的异常已经说的很清楚了,你不应该访问TruePointcut这个类你没有访问权限(因为它并不是一个public类型的)
Struts Problem Report
Struts has detected an unhandled exception: Messages: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"
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: 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: 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: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.TruePointcut with modifiers "public"
File: sun/reflect/Reflection.java
Line number: 65