Hibernate Core errors

An object-relational mapping tool for Java

http://hibernate.org/
Solution coverage:
Summary coverage:

Top patterns

  1. Object references an unsaved transient instance

    If you reference an entity in your statement, you have to make sure that it's already saved.

    If this happens during saving an entity, you might want to cascade.

    If this happens during a query, you might want to change your query

  2. Foreign non-null entity is not saved
    No solution
  3. Persist multiple entities with same Id

    Use saveOrUpdate for persisting entities.

    In ManyToOne , ManyToMany ,OneToMany mappings you can use CascadeType.Merge to resolve this issue.


DescriptionException TypeEntry MethodWeb pages

Object references an unsaved transient instance

org.hibernate.TransientObjectException
org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved
61Web pages
1Solution
TransientObjectExceptionForeignKeys.getEntityIdentifierIfNotUnsaved61

Foreign non-null entity is not saved

org.hibernate.PropertyValueException
org.hibernate.engine.Nullability.checkNullability
57Web pages
PropertyValueExceptionNullability.checkNullability57

Persist multiple entities with same Id

org.hibernate.NonUniqueObjectException
org.hibernate.engine.StatefulPersistenceContext.checkUniqueness
39Web pages
1Solution
NonUniqueObjectExceptionStatefulPersistenceContext.checkUniqueness39

ActionQueue.executeActions() has thrown a GenericJDBCException

org.hibernate.exception.GenericJDBCException
4 frames hidden
org.hibernate.engine.ActionQueue.executeActions
28Web pages
GenericJDBCExceptionActionQueue.executeActions28

Collections.processReachableCollection() has thrown a HibernateException

org.hibernate.HibernateException
org.hibernate.engine.Collections.processReachableCollection
12Web pages
HibernateExceptionCollections.processReachableCollection12

Cascade.cascade() has thrown a TransientObjectException

org.hibernate.TransientObjectException
1 frames hidden
org.hibernate.engine.Cascade.cascade
11Web pages
TransientObjectExceptionCascade.cascade11

EntityKey.<init>() has thrown an AssertionFailure

org.hibernate.AssertionFailure
org.hibernate.engine.EntityKey.<init>
6Web pages
AssertionFailureEntityKey.<init>6

EntityKey.generateHashCode() has thrown a NullPointerException

java.lang.NullPointerException
4 frames hidden
org.hibernate.engine.EntityKey.generateHashCode
4Web pages
NullPointerExceptionEntityKey.generateHashCode4

Nullability.checkNullability() has thrown a HibernateSystemException

org.springframework.orm.hibernate3.HibernateSystemException
org.hibernate.engine.Nullability.checkNullability
3Web pages
HibernateSystemExceptionNullability.checkNullability3

StatefulPersistenceContext.clear() has thrown a NullPointerException

java.lang.NullPointerException
org.hibernate.engine.StatefulPersistenceContext.clear
3Web pages
NullPointerExceptionStatefulPersistenceContext.clear3

StatefulPersistenceContext.checkUniqueness() has thrown a HibernateSystemException

org.springframework.orm.hibernate3.HibernateSystemException
org.hibernate.engine.StatefulPersistenceContext.checkUniqueness
3Web pages
HibernateSystemExceptionStatefulPersistenceContext.checkUniqueness3

ActionQueue.executeActions() has thrown a GenericJDBCException

org.hibernate.exception.GenericJDBCException
org.hibernate.engine.ActionQueue.executeActions
2Web pages
GenericJDBCExceptionActionQueue.executeActions2

Collections.processUnreachableCollection() has thrown an AssertionFailure

org.hibernate.AssertionFailure
1 frames hidden
org.hibernate.engine.Collections.processUnreachableCollection
2Web pages
AssertionFailureCollections.processUnreachableCollection2

EntityEntry.getLoadedValue() has thrown a NullPointerException

java.lang.NullPointerException
org.hibernate.engine.EntityEntry.getLoadedValue
2Web pages
NullPointerExceptionEntityEntry.getLoadedValue2

TwoPhaseLoad.initializeEntity() has thrown a PropertyAccessException

org.hibernate.PropertyAccessException
3 frames hidden
org.hibernate.engine.TwoPhaseLoad.initializeEntity
2Web pages
PropertyAccessExceptionTwoPhaseLoad.initializeEntity2

Cascade.cascadeProperty() has thrown an ObjectDeletedException

org.hibernate.ObjectDeletedException
6 frames hidden
org.hibernate.engine.Cascade.cascadeProperty
1Web pages
ObjectDeletedExceptionCascade.cascadeProperty1

ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion() has thrown a NullPointerException

java.lang.NullPointerException
1 frames hidden
org.hibernate.engine.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion
1Web pages
NullPointerExceptionActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion1

ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion() has thrown a NullPointerException

java.lang.NullPointerException
8 frames hidden
org.hibernate.engine.ActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion
1Web pages
NullPointerExceptionActionQueue$BeforeTransactionCompletionProcessQueue.beforeTransactionCompletion1
Package namePatterns foundSolution coverageSummary coverage
org.hibernate.cfg768
org.hibernate.internal718
org.hibernate.impl443
org.hibernate.loader354
org.hibernate.engine.jdbc.internal352
org.hibernate.jdbc212
org.hibernate.persister.entity183
org.hibernate.event.internal173
org.hibernate.type143
org.hibernate.event.def141
org.hibernate.transaction114
org.hibernate.hql.internal.antlr88
org.hibernate.engine.jdbc.connections.internal83
org.hibernate.engine80
org.hibernate.service.internal77
org.hibernate.engine.internal76
org.hibernate.engine.jdbc.batch.internal73
org.hibernate.connection67
org.hibernate.tool.hbm2ddl64
org.hibernate.mapping63
org.hibernate.collection.internal61
org.hibernate.engine.spi55
org.hibernate.engine.query.spi55
org.hibernate.boot.internal54
org.hibernate.hql.internal.ast52
org.hibernate.collection48
org.hibernate.engine.jdbc.spi45
org.hibernate.tuple.entity44
org.hibernate.engine.transaction.spi44
org.hibernate.engine.jdbc.internal.proxy43
org.hibernate.boot.model.process.spi41
org.hibernate.resource.jdbc.internal39
org.hibernate.engine.transaction.internal38
org.hibernate.tool.schema.internal36
org.hibernate.action.internal35
org.hibernate.id.insert34
org.hibernate.property31
org.hibernate.util31
org.hibernate.query.internal30
org.hibernate.hql.ast29
org.hibernate.cfg.beanvalidation26
org.hibernate.hql.internal.ast.tree25
org.hibernate.cfg.annotations24
org.hibernate.engine.query23
org.hibernate.engine.jdbc.env.internal22
org.hibernate.id21
org.hibernate.loader.criteria21
org.hibernate.exception.internal20
org.hibernate.tool.schema.internal.exec19
org.hibernate.engine.transaction.synchronization.internal19
Package nameClass namePatterns foundSolution coverageSummary coverage
org.hibernate.engineActionQueue30
org.hibernate.engineCascade23
org.hibernate.engineForeignKeys6
org.hibernate.engineStatefulPersistenceContext4
org.hibernate.engineEntityKey4
org.hibernate.engineNullability2
org.hibernate.engineVersioning2
org.hibernate.engineCollections2
org.hibernate.engineActionQueue$BeforeTransactionCompletionProcessQueue2
org.hibernate.engineTwoPhaseLoad2
org.hibernate.engineEntityEntry1
org.hibernate.engineTransactionHelper$1Work1
org.hibernate.engineCascadingAction$11
Package nameClass nameMethod namePatterns foundSolution coverage
org.hibernate.engineActionQueueexecuteActions22
org.hibernate.engineCascadecascadeProperty13
org.hibernate.engineCascadecascade9
org.hibernate.engineActionQueueexecute8
org.hibernate.engineForeignKeysisTransient5
org.hibernate.engineEntityKey<init>3
org.hibernate.engineStatefulPersistenceContextcheckUniqueness2
org.hibernate.engineTwoPhaseLoadinitializeEntity2
org.hibernate.engineActionQueue$BeforeTransactionCompletionProcessQueuebeforeTransactionCompletion2
org.hibernate.engineVersioningincrement2
org.hibernate.engineNullabilitycheckNullability2
org.hibernate.engineCollectionsprocessUnreachableCollection1
org.hibernate.engineTransactionHelper$1WorkdoWork1
org.hibernate.engineEntityKeygenerateHashCode1
org.hibernate.engineCollectionsprocessReachableCollection1
org.hibernate.engineCascadedeleteOrphans1
org.hibernate.engineStatefulPersistenceContextunproxyAndReassociate1
org.hibernate.engineEntityEntrygetLoadedValue1
org.hibernate.engineForeignKeysgetEntityIdentifierIfNotUnsaved1
org.hibernate.engineCascadingAction$1cascade1
org.hibernate.engineStatefulPersistenceContextclear1
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
org.hibernate.engineActionQueueexecuteActionsGenericJDBCException6
org.hibernate.engineCascadecascadePropertyNonUniqueObjectException4
org.hibernate.engineActionQueueexecuteActionsBatchUpdateException3
org.hibernate.engineCascadecascadeTransientObjectException3
org.hibernate.engineCascadecascadeNonUniqueObjectException3
org.hibernate.engineForeignKeysisTransientPropertyAccessException3
org.hibernate.engineActionQueueexecuteActionsSQLGrammarException2
org.hibernate.engineActionQueueexecuteActionsConstraintViolationException2
org.hibernate.engineActionQueueexecuteActionsTransientObjectException2
org.hibernate.engineActionQueueexecuteConstraintViolationException2
org.hibernate.engineActionQueueexecuteActionsStaleStateException2
org.hibernate.engineActionQueue$BeforeTransactionCompletionProcessQueuebeforeTransactionCompletionNullPointerException2
org.hibernate.engineCascadecascadePropertyObjectDeletedException2
org.hibernate.engineCascadecascadePropertyPersistentObjectException2
org.hibernate.engineCascadecascadePropertyConstraintViolationException2
org.hibernate.engineVersioningincrementNullPointerException2
org.hibernate.engineActionQueueexecuteActionsLockAcquisitionException1
org.hibernate.engineActionQueueexecuteAssertionFailure1
org.hibernate.engineActionQueueexecuteActionsInvalidStateException1
org.hibernate.engineActionQueueexecuteActionsIndexOutOfBoundsException1
org.hibernate.engineActionQueueexecuteActionsDataException1
org.hibernate.engineActionQueueexecuteActionsStaleObjectStateException1
org.hibernate.engineActionQueueexecuteStaleObjectStateException1
org.hibernate.engineActionQueueexecuteIllegalStateException1
org.hibernate.engineActionQueueexecuteGenericJDBCException1
org.hibernate.engineActionQueueexecuteDataException1
org.hibernate.engineActionQueueexecuteConstraintViolationException1
org.hibernate.engineCascadecascadePersistentObjectException1
org.hibernate.engineCascadecascadePropertyIdentifierGenerationException1
org.hibernate.engineCascadecascadeConstraintViolationException1
org.hibernate.engineCascadedeleteOrphansTransientObjectException1
org.hibernate.engineCascadecascadePropertyPropertyValueException1
org.hibernate.engineCascadecascadeNullPointerException1
org.hibernate.engineCascadecascadePropertyTransientObjectException1
org.hibernate.engineCascadingAction$1cascadePropertyValueException1
org.hibernate.engineCollectionsprocessUnreachableCollectionAssertionFailure1
org.hibernate.engineCollectionsprocessReachableCollectionHibernateException1
org.hibernate.engineEntityEntrygetLoadedValueNullPointerException1
org.hibernate.engineEntityKey<init>PropertyAccessException1
org.hibernate.engineEntityKey<init>NullPointerException1
org.hibernate.engineEntityKey<init>AssertionFailure1
org.hibernate.engineEntityKeygenerateHashCodeNullPointerException1
org.hibernate.engineForeignKeysisTransientHibernateException1
org.hibernate.engineForeignKeysgetEntityIdentifierIfNotUnsavedTransientObjectException1
org.hibernate.engineForeignKeysisTransientIllegalArgumentException1
org.hibernate.engineNullabilitycheckNullabilityHibernateSystemException1
org.hibernate.engineNullabilitycheckNullabilityPropertyValueException1
org.hibernate.engineStatefulPersistenceContextcheckUniquenessNonUniqueObjectException1
org.hibernate.engineStatefulPersistenceContextunproxyAndReassociateHibernateException1
org.hibernate.engineStatefulPersistenceContextclearNullPointerException1