Hibernate Core errors

An object-relational mapping tool for Java

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

Top patterns

  1. Hibernate tried to persist the 2 instances of same entity with same Id

    Use saveOrUpdate for persisting Objects. In ManyToOne , ManyToMany ,OneToMany Mapping Use CascadeType.Merge to resolve issue

  2. StatefulPersistenceContext.clear() has thrown a NullPointerException
    No solution

DescriptionException TypeEntry MethodWeb pages

Hibernate tried to persist the 2 instances of same entity with same Id

org.hibernate.NonUniqueObjectException
org.hibernate.engine.StatefulPersistenceContext.checkUniqueness
36Web pages
1Solution
NonUniqueObjectExceptionStatefulPersistenceContext.checkUniqueness36

StatefulPersistenceContext.clear() has thrown a NullPointerException

java.lang.NullPointerException
org.hibernate.engine.StatefulPersistenceContext.clear
3Web pages
NullPointerExceptionStatefulPersistenceContext.clear3
Package namePatterns foundSolution coverageSummary coverage
org.hibernate.cfg768
org.hibernate.internal715
org.hibernate.impl443
org.hibernate.loader354
org.hibernate.engine.jdbc.internal347
org.hibernate.jdbc214
org.hibernate.persister.entity183
org.hibernate.event.internal173
org.hibernate.type142
org.hibernate.event.def141
org.hibernate.transaction114
org.hibernate.hql.internal.antlr88
org.hibernate.engine.jdbc.connections.internal82
org.hibernate.engine79
org.hibernate.engine.internal77
org.hibernate.service.internal77
org.hibernate.engine.jdbc.batch.internal72
org.hibernate.connection67
org.hibernate.tool.hbm2ddl64
org.hibernate.mapping63
org.hibernate.collection.internal61
org.hibernate.engine.query.spi54
org.hibernate.engine.spi53
org.hibernate.boot.internal53
org.hibernate.hql.internal.ast51
org.hibernate.collection48
org.hibernate.engine.jdbc.spi45
org.hibernate.engine.transaction.spi44
org.hibernate.tuple.entity44
org.hibernate.engine.jdbc.internal.proxy43
org.hibernate.boot.model.process.spi40
org.hibernate.engine.transaction.internal36
org.hibernate.tool.schema.internal35
org.hibernate.id.insert34
org.hibernate.resource.jdbc.internal34
org.hibernate.action.internal33
org.hibernate.property31
org.hibernate.util31
org.hibernate.hql.ast29
org.hibernate.query.internal28
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.loader.criteria21
org.hibernate.id20
org.hibernate.exception.internal20
org.hibernate.engine.transaction.synchronization.internal19
org.hibernate.proxy.pojo.javassist19
Package nameClass namePatterns foundSolution coverageSummary coverage
org.hibernate.engineActionQueue30
org.hibernate.engineCascade23
org.hibernate.engineForeignKeys6
org.hibernate.engineEntityKey4
org.hibernate.engineStatefulPersistenceContext3
org.hibernate.engineCollections2
org.hibernate.engineActionQueue$BeforeTransactionCompletionProcessQueue2
org.hibernate.engineVersioning2
org.hibernate.engineTwoPhaseLoad2
org.hibernate.engineNullability2
org.hibernate.engineEntityEntry1
org.hibernate.engineCascadingAction$11
org.hibernate.engineTransactionHelper$1Work1
Package nameClass nameMethod namePatterns foundSolution coverage
org.hibernate.engineStatefulPersistenceContextcheckUniqueness1
org.hibernate.engineStatefulPersistenceContextunproxyAndReassociate1
org.hibernate.engineStatefulPersistenceContextclear1
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
org.hibernate.engineStatefulPersistenceContextcheckUniquenessNonUniqueObjectException1
org.hibernate.engineStatefulPersistenceContextunproxyAndReassociateHibernateException1
org.hibernate.engineStatefulPersistenceContextclearNullPointerException1