JSONObject.fromObject(hibernate对象)
出现以下Exception
解决方法如下
出现以下Exception
net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
net.sf.json.JSONObject._fromBean(JSONObject.java:959)
detaiMessage:Positioned Update not supported.
解决方法如下
JsonConfig jsonConfig=new JsonConfig();
jsonConfig.setExcludes(new String[]{"handler","hibernateLazyInitializer"});
JSONObject.fromObject(hibernate对象,jsonConfig);
本文介绍了一种解决将Hibernate对象转换为JSON时遇到的JSONException问题的方法。通过配置JsonConfig并排除特定字段,成功避免了PositionedUpdate not supported错误。
1510

被折叠的 条评论
为什么被折叠?



