当前位置: 代码迷 >> J2EE >> failed to lazily initialize a collection of role: com.huawei.ciweb.entity.po.Rnd,该怎么解决
  详细解决方案

failed to lazily initialize a collection of role: com.huawei.ciweb.entity.po.Rnd,该怎么解决

热度:563   发布时间:2016-04-21 22:37:17.0
failed to lazily initialize a collection of role: com.huawei.ciweb.entity.po.Rnd
2013-08-13 14:33:42 [ERROR] (LazyInitializationException.java:42) - failed to lazily initialize a collection of role: com.huawei.ciweb.entity.po.RndlteCiVersion.rndlteCiBrokens, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.huawei.ciweb.entity.po.RndlteCiVersion.rndlteCiBrokens, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:380)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:372)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:365)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108)
at org.hibernate.collection.PersistentSet.equals(PersistentSet.java:429)
at java.util.Vector.indexOf(Vector.java:361)
at java.util.Vector.contains(Vector.java:320)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:110)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:363)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:223)
at org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:171)
at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:161)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:127)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:363)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:223)
at org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:171)
at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:161)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:127)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:363)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:223)
at org.apache.struts2.json.JSONWriter.processCustom(JSONWriter.java:171)
at org.apache.struts2.json.JSONWriter.process(JSONWriter.java:161)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:127)
at org.apache.struts2.json.JSONWriter.write(JSONWriter.java:95)
at org.apache.struts2.json.JSONUtil.serialize(JSONUtil.java:116)
at org.apache.struts2.json.JSONResult.createJSONString(JSONResult.java:196)
at org.apache.struts2.json.JSONResult.execute(JSONResult.java:170)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:374)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278)
  相关解决方案