1 2 Previous Next 15 Replies Latest reply on Dec 30, 2005 3:19 PM by Emmanuel Bernard

    merge failed (Unknown entity: ... $$EnhancerByCGLIB$$ )

    silviu.marcu Newbie

      Hi,
      I have a strange behaviour (may be I am missing something)

      I have an object A that has a relation to B,
      I detach the A with lazy B,
      I merge the A and get the A.B .. I obtain an enhanced object,
      when I try to merge the A.B it crashes with:

      Caused by: org.hibernate.MappingException: Unknown entity: ..............$$EnhancerByCGLIB$$b1e5cf42
      10:50:27,467 ERROR [STDERR] at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:610)
      10:50:27,467 ERROR [STDERR] at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1249)
      10:50:27,467 ERROR [STDERR] at org.hibernate.event.def.DefaultMergeEventListener.entityIsPersistent(DefaultMergeEventListener.java:130)
      10:50:27,467 ERROR [STDERR] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:108)
      10:50:27,467 ERROR [STDERR] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53)
      10:50:27,467 ERROR [STDERR] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:636)
      10:50:27,467 ERROR [STDERR] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:622)
      10:50:27,468 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:140)

      -------------
      thanks for help

        1 2 Previous Next