net.sf.json.JSONException: There is a cycle in the hierarchy! 转json死循环问题解决
解决上述问题遵照两个原则就可以:
1、页面不需要展示关联数据时
解决:将关联对象属性排除掉
2、页面需要展示关联数据时
解决:将关联对象改为立即加载,并且将关联对象中的属性排除
net.sf.json.JSONException: There is a cycle in the hierarchy! 转json死循环问题解决的更多相关文章
- atitit.解决net.sf.json.JSONException There is a cycle in the hierarchy
atitit.解决net.sf.json.JSONException There is a cycle in the hierarchy 1. 环境:使用hibernate4跟个,,要不个哪的对象系列 ...
- net.sf.json.JSONException: There is a cycle in the hierarchy!
因为项目中使用了AJAX技术,jar包为:json-lib.jar,在开发过程中遇到了一个JSON-LIB和Hibernate有关的问题: 如hibernate延迟加载错误,这都是些老问题了,一看就知 ...
- net.sf.json.JSONException: There is a cycle in the hierarchy!错误解决方案
net.sf.json.JSONException: There is a cycle in the hierarchy!错误解决方案 今天在用List集合转换成json数组的时候发生了这个错误,这个 ...
- net.sf.json.JSONException: There is a cycle in the hierarchy!的解决办法
使用Hibernate manytoone属性关联主表的时候,如果使用JSONArray把pojo对象转换成json对象时,很容易出现循环的异常.解决的办法就是, 在转换json对象时忽略manyto ...
- json-lib-2.4-jdk15.jar 报错 net.sf.json.JSONException: There is a cycle in the hierarchy!错误解决方案(Hibernate)
使用hibernate容易出现该问题,主要是由于pojo类属性存在级联关系.比如说员工和部门,在员工表里面有部门属性,而在部门表里面有个员工集合,这样就存在了嵌套引用的问题了,就会抛出这个异常. 解决 ...
- hibernate:There is a cycle in the hierarchy! 造成死循环解决办法
下面是报的异常:在网上搜了关于:There is a cycle in the hierarchy!,才知道原来是因为死循环造成的!解决了好久,没有成功,后台不得已请教老大,老大说是因为在使用JSON ...
- Json_异常_net.sf.json.JSONException: JSONObject["solution"] not found.
net.sf.json.JSONException: JSONObject["solution"] not found. 没有这个元素造成的. 问题代码: JSONObject j ...
- net.sf.json.JSONException: java.lang.NoSuchMethodException
在尝试将json对象转换为list时候出现了如下错误 Exception in thread "main" net.sf.json.JSONException: java.lang ...
- json解析异常 - net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
注:在项目中, 我使用原生的ajax请求数据的时候, JSONObject没能帮我解析, 当却不给我报错, 我是在junit单元测试中测试的时候, 发现的.发现好多时候, 特别是通过ajax请求, 不 ...
随机推荐
- arcconf工具相关命令V1.0
arcconf工具相关命令V1.0 清除当前所有raid配置 Arcconf delete 1 array all #删除所有逻辑盘 Arcconf uninit 1 all ...
- Sqoop 遇到的问题
1. 想用 sqoop 增量的方式导入到 hive.运行下面的命令: sqoop import --connect jdbc:mysql://192.168.7.159:3306/test --u ...
- 洛谷P2761 软件补丁问题(状压dp)
传送门 啊咧……这题不是网络流二十四题么……为啥是个状压dp…… 把每一个漏洞看成一个状态,直接硬上状压dp 然后因为有后效型,得用spfa //minamoto #include<iostre ...
- vue中axios的使用与封装
分享下我自己的axios封装axios是个很好用的插件,都是一些params对象,所以很方便做一些统一处理 当然首先是npm安装axios 很简单$ npm install axios --save在 ...
- opencv学习笔记3——图像缩放,翻转和阈值分割
#图像的缩放操作 #cv.resize(src,dsize,dst=None,,fx=None,fy=None,interpolation=None) #src->原图像,dsize->目 ...
- Eclipse 使用TFS
Install Soft , –> add http://dl.microsoft.com/eclipse/tfs form:http://msdn.microsoft.com/en-us/ ...
- CentOS7.4关闭防火墙
//临时关闭 systemctl stop firewalld //禁止开机启动 systemctl disable firewalld Removed symlink /etc/systemd/sy ...
- 10、C++函数
1.定义函数和函数调用: 1.1.定义函数: 可以将函数分为两类,没有返回值的函数,和有返回值得函数,没有返回值得函数被称为void函数,其通用格式如下: void funtionname (para ...
- js自定义对象 (转)
原文地址:https://sjolzy.cn/js-custom-object.html 29 March 2010 9:53 Monday by 小屋 javascript进阶之对象篇 一,概述 在 ...
- 斐讯 N1 刷 Armbian 5.75
前言 不知不觉居然鸽了快半年的博客_(:3」∠)_ 好吧最近发现之前玩的 N1 Armbian 系统已经出到 5.75 了,之前刷 5.64 玩过,具体博文在此,说实话并不是很稳定,有线网络有时会卡死 ...