0 Replies Latest reply on Jul 14, 2008 10:46 AM by vivekmk2006

    org.hibernate.HibernateException: Found shared references to

    vivekmk2006

      Hi all,
      When i am trying to Iterate a collection recursively i am getting a exception like bellow.


      org.hibernate.HibernateException: Found shared references to a collection: com.camsoft.camera.common.entity.MenuItems.menuItemses
      at org.hibernate.engine.Collections.processReachableCollection(Collections.java:163)
      at org.hibernate.event.def.FlushVisitor.processCollection(FlushVisitor.java:37)
      at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101)
      at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61)
      at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55)
      at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:138)
      at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
      at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
      at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35)
      at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
      at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
      ... 90 more

      Can anybody can please give me a hint about what is the above error.

      Thanks in advance
      Vivek