org.hibernate.HibernateException: this instance does not yet exist as a row in the database

GitHub | bradmac | 3 months ago
  1. 0

    Funnels do not appear to work with automation

    GitHub | 3 months ago | bradmac
    org.hibernate.HibernateException: this instance does not yet exist as a row in the database
  2. 0

    When you initialize the collection of an OneToMany relation with {{orphanRemoval=true}} with {{null}}, Hibernate fails to persist changes to a (re)loaded entity with the following exception: {code} org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: ... at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:114) at org.hibernate.engine.internal.Collections.processUnreachableCollection(Collections.java:67) at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:258) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:103) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:55) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1258) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1335) {code} Things work however, if * the collection is initialized with an empty collection (instead of {{null}}) * orphanRemoval is set to false This may be related to HHH-7726 and/or HHH-9935, but the null collection case is not covered there. You may find a small stripped down test project on Github https://github.com/abenneke/sandbox/tree/master/hibernate-null-collection Thank you!

    Hibernate JIRA | 1 year ago | Andreas Benneke
    org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: ...
  3. 0

    db:: 4.32::70-122 xa

    hivmr.com | 5 months ago
    org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.context.exe.variableinstance.UnpersistableInstance is not a: org.jbpm.context.exe.VariableInstance
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unable to instantiate specified TransactionFactory class [org.transaction.JDBCTransactionFactory]

    Stack Overflow | 3 years ago | TangoStar
    org.hibernate.HibernateException: Unable to instantiate specified TransactionFactory class [org.transaction.JDBCTransactionFactory]</em></p> <p>I have searched really alot, but I couldn't find any solution for my problem. As I understand, the problem occures in this line:</p> <pre><code>sessionfactory=cfgogm.buildSessionFactory(serviceregistry); </code></pre> <p>If I comment the other lines I have no exception, only INFOS.</p> <p>this is my Stacktrace:</p> <pre><code>at org.hibernate.engine.transaction.internal.TransactionFactoryInitiator.initiateService(TransactionFactoryInitiator.java:80)
  6. 0

    I have two dynamic model entites mapped as follows: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class entity-name="Superclass" discriminator-value="A"> <id name="id" type="integer"><generator class="native"/></id> <discriminator column="DISC" type="string" /> <property name="dataA" type="string"/> <subclass entity-name="Subclass" discriminator-value="B"> <property name="dataB" type="string"/> </subclass> </class> </hibernate-mapping> When I try to persist one of them (just invoking session.persist("Superclass", new HashMap()); is enough) I get the following exception: Exception in thread "main" org.hibernate.HibernateException: instance not of expected entity type: java.util.HashMap is not a: Superclass at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3640) at org.jboss.envers.test.working.MyPersister.getSubclassEntityPersister(MyPersister.java:22) at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1347) at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:180) at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:512) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:70) at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38) at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618) at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592) at org.jboss.envers.test.working.WorkingMain.main(WorkingMain.java:62)

    Hibernate JIRA | 8 years ago | Adam Warski
    org.hibernate.HibernateException: instance not of expected entity type: java.util.HashMap is not a: Superclass

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.HibernateException

      this instance does not yet exist as a row in the database

      at org.hibernate.event.internal.DefaultRefreshEventListener.onRefresh()
    2. Hibernate
      SessionImpl.refresh
      1. org.hibernate.event.internal.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:113)
      2. org.hibernate.event.internal.DefaultRefreshEventListener.onRefresh(DefaultRefreshEventListener.java:63)
      3. org.hibernate.internal.SessionImpl.fireRefresh(SessionImpl.java:1063)
      4. org.hibernate.internal.SessionImpl.refresh(SessionImpl.java:1040)
      5. org.hibernate.internal.SessionImpl.refresh(SessionImpl.java:1035)
      5 frames
    3. io.milton.cloud
      SearchManager.lambda$new$1
      1. io.milton.cloud.server.manager.SearchManager.checkRefresh(SearchManager.java:882)
      2. io.milton.cloud.server.manager.SearchManager.lambda$applyDeferredOps$9(SearchManager.java:864)
      3. io.milton.cloud.server.search.DefaultElasticSearchManager.bulk(DefaultElasticSearchManager.java:731)
      4. io.milton.cloud.server.manager.SearchManager.applyDeferredOps(SearchManager.java:857)
      5. io.milton.cloud.server.manager.SearchManager.lambda$new$1(SearchManager.java:101)
      5 frames
    4. io.milton.event
      EventManagerImpl.fireEvent
      1. io.milton.event.EventManagerImpl.fireEvent(EventManagerImpl.java:42)
      1 frame
    5. io.milton.cloud
      EventUtils.fireQuietly
      1. io.milton.cloud.util.EventUtils.fireQuietly(EventUtils.java:21)
      1 frame
    6. co.kademi.server
      KademiAuditService.afterTransactionCompletion
      1. co.kademi.server.stream.audit.KademiAuditService.afterTransactionCompletion(KademiAuditService.java:113)
      1 frame
    7. io.milton.vfs
      KademiInterceptor.afterTransactionCompletion
      1. io.milton.vfs.db.utils.KademiInterceptor.afterTransactionCompletion(KademiInterceptor.java:140)
      1 frame
    8. Hibernate
      TransactionCoordinatorImpl.afterTransaction
      1. org.hibernate.internal.SessionImpl.afterTransactionCompletion(SessionImpl.java:508)
      2. org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.afterTransaction(TransactionCoordinatorImpl.java:147)
      2 frames