3 Replies Latest reply on Dec 2, 2010 8:46 AM by Adam Warski

    inheritance - joined strategy

    Alexander Uraltsev Newbie

      Hi,

      Inheritance strategy JOINED is supported in backport release 1.2.3-hibernate-3.3?

       

      There is the following exception when i attempt persist audited entities:

       

       

      Caused by: org.hibernate.HibernateException: instance not of expected entity type: java.util.HashMap is not a: com.entity.customer.impl.IndividualImpl_AUD

              at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3663)

              at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1374)

              at org.hibernate.id.Assigned.generate(Assigned.java:51)

              at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122)

              at org.hibernate.ejb.event.EJB3SaveEventListener.saveWithGeneratedId(EJB3SaveEventListener.java:43)

              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)

              at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)

              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)

              at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)

              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)

              at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)

              at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)

              at org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit.perform(AbstractAuditWorkUnit.java:70)

              at org.hibernate.envers.synchronization.AuditSync.executeInSession(AuditSync.java:119)

              at org.hibernate.envers.synchronization.AuditSync.beforeCompletion(AuditSync.java:158)

              at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)

              at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)

              at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)

       

       

      Thanks,

      Alex

       

       

      Caused by: org.hibernate.HibernateException: instance not of expected entity type: java.util.HashMap is not a: com.magenta.sc.core.entity.customer.impl.IndividualImpl_AUD
              at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3663)
              at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1374)
              at org.hibernate.id.Assigned.generate(Assigned.java:51)
              at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122)
              at org.hibernate.ejb.event.EJB3SaveEventListener.saveWithGeneratedId(EJB3SaveEventListener.java:43)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
              at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
              at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
              at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
              at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)
              at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)
              at org.hibernate.envers.synchronization.work.AbstractAuditWorkUnit.perform(AbstractAuditWorkUnit.java:70)
              at org.hibernate.envers.synchronization.AuditSync.executeInSession(AuditSync.java:119)
              at org.hibernate.envers.synchronization.AuditSync.beforeCompletion(AuditSync.java:158)
              at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:101)
              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:269)
              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:89)
              at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
              at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1423)