Spring hibernate struts2 jsonPlugin的报错

来源:百度知道 编辑:UC知道 时间:2024/06/09 12:53:26
com.googlecode.jsonplugin.JSONException: com.googlecode.jsonplugin.JSONException: java.lang.reflect.InvocationTargetException
com.googlecode.jsonplugin.JSONWriter.bean(JSONWriter.java:239)
com.googlecode.jsonplugin.JSONWriter.process(JSONWriter.java:161)
com.googlecode.jsonplugin.JSONWriter.value(JSONWriter.java:127)

jquery 使用的是getjson,struts2返回的是list,list数据有外键具体如下:
action(get set 省略): public String sbSelfList() throws Exception {
Map sess=ActionContext.getContext().getSession();
Integer value=((Qx)sess.get("qx")).getUserid();
String hql="from Sb s where s.yg.ygNum=(select y.ygNum from Yg y where y.qx.userid="+value+")";
this.pageBean = memberService.queryForPage(hql,10, page);
return SUCCESS;
struts。xml:
<action name="sbselflist" class="listaction" method="sbSelfList">
<result name="succe

<package name="hello" extends="json-default" >

<result type="json"/> 我都没写过name的 jquery 虽然有url 的 这一点和dwr一样就是 不用返回的页面啊,,,

建议你不要 用谷歌的 我是:json-lib-2.2.3-jdk15.jar 用的很习惯的
不知道你有什么看法