failed to lazily initialize a collection of role: cn.qcc.bos.domain.take_delivery.Order.workBills,
来源:互联网 发布:cad软件下载什么版本 编辑:程序博客网 时间:2024/06/05 20:46
解决方式:
对多集合数据懒加载问题,排除掉关联集合数据转换 json
添加一个注解 @JSON(serialize = false) 在实体类中的集合的get方法上添加 即可 要是maven工程 最后记得install
role: cn.qcc.bos.domain.take_delivery.Order.workBills, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:563)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded
(AbstractPersistentCollection.java:205)at org.hibernate.collection.internal.AbstractPersistentCollection.initialize
(AbstractPersistentCollection.java:542)at org.hibernate.collection.internal.AbstractPersistentCollection.read
(AbstractPersistentCollection.java:133)at org.hibernate.collection.internal.PersistentSet.equals(PersistentSet.java:423)
at java.util.Vector.indexOf(Vector.java:404)
at java.util.Vector.contains(Vector.java:363)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:117)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:401)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:231)
... 74 more
阅读全文
1 0
- failed to lazily initialize a collection of role: cn.qcc.bos.domain.take_delivery.Order.workBills,
- Maven项目懒加载 failed to lazily initialize a collection of role: cn.itcast.bos.domain.base.Area.subareas
- org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: cn.oa.d
- failed to lazily initialize a collection of role:
- failed to lazily initialize a collection of role:
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role问题
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role
- failed to lazily initialize a collection of role:报错
- linux中服务的开启于关闭
- [ZJOI2006]物流运输trans
- Java排序算法之希尔排序
- android jniLibs下so库详解
- Aop 编程中joinpoint中参数列表
- failed to lazily initialize a collection of role: cn.qcc.bos.domain.take_delivery.Order.workBills,
- BZOJ 1096 [ZJOI2007]仓库建设
- 2017"百度之星"程序设计大赛
- 专治Java集合面试回答以及观察者模式解读
- MYSQL之Innodb锁
- JS运动框架及举例
- JAVA 判断当前日期的星期
- WPF获得PNG图片外观Path数据
- arm linux kernel 从入口到start_kernel 的代码分析