1. Explore
  2. »
  3. Hibernate Core

Hibernate Core errors

An object-relational mapping tool for Java

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

Top patterns

  1. Cannot load lazy property after session is closed

    Refactor your code. Easiest is to change fetch = FetchType.LAZY to fetch = EAGER and optimize later.

    If it is not possible, make sure to fetch the property in the same transaction.

  2. Suspicious operation on a row in batch

    This happens in multiple cases when executing a batch query:

    • updating the same row more than once in a transaction
    • updating a row by id that does not exist
    • deleting a row by id that does not exist
  3. Configuration.doConfigure() has thrown a DocumentException
    No solution
Error patternsPackagesClassesMethodsExceptions
DescriptionException TypeEntry MethodWeb pages

Cannot load lazy property after session is closed

org.hibernate.LazyInitializationException
org.hibernate.proxy.AbstractLazyInitializer.initialize
225Web pages
1Solution
LazyInitializationExceptionAbstractLazyInitializer.initialize225

Suspicious operation on a row in batch

org.hibernate.StaleStateException
1 frames hidden
org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome
157Web pages
1Solution
StaleStateExceptionExpectations$BasicExpectation.verifyOutcome157

Configuration.doConfigure() has thrown a DocumentException

org.dom4j.DocumentException
1 frames hidden
org.hibernate.cfg.Configuration.doConfigure
145Web pages
DocumentExceptionConfiguration.doConfigure145

Using mixed field-based and process-based access strategies

org.hibernate.MappingException
org.hibernate.mapping.SimpleValue.getType
143Web pages
MappingExceptionSimpleValue.getType143

Configuration.doConfigure() has thrown a HibernateException

org.dom4j.DocumentException
2 frames hidden
org.hibernate.cfg.Configuration.doConfigure
131Web pages
HibernateExceptionConfiguration.doConfigure131

Hibernate trying to use an already closed session

org.hibernate.LazyInitializationException
2 frames hidden
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke
130Web pages
1Solution
LazyInitializationExceptionJavassistLazyInitializer.invoke130

Two transactions concurrently modified the same entity

org.hibernate.StaleObjectStateException
org.hibernate.persister.entity.AbstractEntityPersister.check
119Web pages
StaleObjectStateExceptionAbstractEntityPersister.check119

AbstractPersistentCollection.withTemporarySessionIfNeeded() has thrown a LazyInitializationException

org.hibernate.LazyInitializationException
1 frames hidden
org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded
118Web pages
LazyInitializationExceptionAbstractPersistentCollection.withTemporarySessionIfNeeded118

AbstractPersistentCollection.initialize() has thrown a LazyInitializationException

org.hibernate.LazyInitializationException
2 frames hidden
org.hibernate.collection.AbstractPersistentCollection.initialize
118Web pages
LazyInitializationExceptionAbstractPersistentCollection.initialize118

Constraint violation

org.hibernate.exception.ConstraintViolationException
org.hibernate.exception.SQLStateConverter.convert
116Web pages
1Solution
ConstraintViolationExceptionSQLStateConverter.convert116

SimpleValue.isValid() has thrown a MappingException

org.hibernate.MappingException
1 frames hidden
org.hibernate.mapping.SimpleValue.isValid
114Web pages
MappingExceptionSimpleValue.isValid114

SessionFactoryImpl.getCurrentSession() has thrown a HibernateException

org.hibernate.HibernateException
1 frames hidden
org.hibernate.internal.SessionFactoryImpl.getCurrentSession
114Web pages
HibernateExceptionSessionFactoryImpl.getCurrentSession114

JDBCExceptionHelper.convert() has thrown a SQLGrammarException

org.hibernate.exception.SQLGrammarException
1 frames hidden
org.hibernate.exception.JDBCExceptionHelper.convert
113Web pages
SQLGrammarExceptionJDBCExceptionHelper.convert113

Missing mapping

org.hibernate.MappingException
org.hibernate.impl.SessionFactoryImpl.getEntityPersister
109Web pages
MappingExceptionSessionFactoryImpl.getEntityPersister109

AbstractEntityPersister.update() has thrown a StaleObjectStateException

org.hibernate.StaleObjectStateException
1 frames hidden
org.hibernate.persister.entity.AbstractEntityPersister.update
103Web pages
StaleObjectStateExceptionAbstractEntityPersister.update103

JDBCExceptionHelper.convert() has thrown a ConstraintViolationException

org.hibernate.exception.ConstraintViolationException
1 frames hidden
org.hibernate.exception.JDBCExceptionHelper.convert
103Web pages
ConstraintViolationExceptionJDBCExceptionHelper.convert103

Property.isValid() has thrown a MappingException

org.hibernate.MappingException
2 frames hidden
org.hibernate.mapping.Property.isValid
102Web pages
MappingExceptionProperty.isValid102

AbstractEntityPersister.update() has thrown a StaleObjectStateException

org.hibernate.StaleObjectStateException
3 frames hidden
org.hibernate.persister.entity.AbstractEntityPersister.update
101Web pages
StaleObjectStateExceptionAbstractEntityPersister.update101

PersistentClass.validate() has thrown a MappingException

org.hibernate.MappingException
3 frames hidden
org.hibernate.mapping.PersistentClass.validate
100Web pages
MappingExceptionPersistentClass.validate100

AbstractPersistentCollection.read() has thrown a LazyInitializationException

org.hibernate.LazyInitializationException
3 frames hidden
org.hibernate.collection.AbstractPersistentCollection.read
97Web pages
LazyInitializationExceptionAbstractPersistentCollection.read97

Configuration.configure() has thrown a HibernateException

org.dom4j.DocumentException
3 frames hidden
org.hibernate.cfg.Configuration.configure
97Web pages
HibernateExceptionConfiguration.configure97

Property name mismatch

org.hibernate.QueryException
org.hibernate.persister.entity.AbstractPropertyMapping.propertyException
93Web pages
1Solution
QueryExceptionAbstractPropertyMapping.propertyException93

RootClass.validate() has thrown a MappingException

org.hibernate.MappingException
4 frames hidden
org.hibernate.mapping.RootClass.validate
88Web pages
MappingExceptionRootClass.validate88

Cannot map a JDBC type to hibernate type

org.hibernate.MappingException
1 frames hidden
org.hibernate.dialect.TypeNames.get
84Web pages
1Solution
MappingExceptionTypeNames.get84

AbstractPersistentCollection.initialize() has thrown a LazyInitializationException

org.hibernate.LazyInitializationException
2 frames hidden
org.hibernate.collection.internal.AbstractPersistentCollection.initialize
82Web pages
LazyInitializationExceptionAbstractPersistentCollection.initialize82

Missing mapping

org.hibernate.MappingException
org.hibernate.internal.SessionFactoryImpl.getEntityPersister
80Web pages
1Solution
MappingExceptionSessionFactoryImpl.getEntityPersister80

AbstractPropertyMapping.toType() has thrown a QueryException

org.hibernate.QueryException
1 frames hidden
org.hibernate.persister.entity.AbstractPropertyMapping.toType
77Web pages
QueryExceptionAbstractPropertyMapping.toType77

QuerySyntaxException.convert() has thrown a QuerySyntaxException

org.hibernate.hql.ast.QuerySyntaxException
1 frames hidden
org.hibernate.hql.ast.QuerySyntaxException.convert
77Web pages
QuerySyntaxExceptionQuerySyntaxException.convert77

SessionImpl.getEntityPersister() has thrown a MappingException

org.hibernate.MappingException
1 frames hidden
org.hibernate.impl.SessionImpl.getEntityPersister
75Web pages
MappingExceptionSessionImpl.getEntityPersister75

HQL syntax error

org.hibernate.hql.internal.ast.QuerySyntaxException
org.hibernate.hql.internal.ast.QuerySyntaxException.convert
73Web pages
1Solution
QuerySyntaxExceptionQuerySyntaxException.convert73

EntityUpdateAction.execute() has thrown a StaleObjectStateException

org.hibernate.StaleObjectStateException
4 frames hidden
org.hibernate.action.EntityUpdateAction.execute
73Web pages
StaleObjectStateExceptionEntityUpdateAction.execute73

ErrorCounter.throwQueryException() has thrown a QuerySyntaxException

org.hibernate.hql.ast.QuerySyntaxException
2 frames hidden
org.hibernate.hql.ast.ErrorCounter.throwQueryException
72Web pages
QuerySyntaxExceptionErrorCounter.throwQueryException72

ActionQueue.executeActions() has thrown a StaleObjectStateException

org.hibernate.StaleObjectStateException
7 frames hidden
org.hibernate.engine.ActionQueue.executeActions
70Web pages
StaleObjectStateExceptionActionQueue.executeActions70

HQL syntax error - bad table name

org.hibernate.hql.ast.QuerySyntaxException
org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister
69Web pages
1Solution
QuerySyntaxExceptionSessionFactoryHelper.requireClassPersister69

Session is closed

org.hibernate.SessionException
org.hibernate.impl.AbstractSessionImpl.errorIfClosed
65Web pages
1Solution
SessionExceptionAbstractSessionImpl.errorIfClosed65

Concurrent usage of a session

org.hibernate.service.UnknownServiceException
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService
64Web pages
1Solution
UnknownServiceExceptionAbstractServiceRegistryImpl.getService64

FromClause.addFromElement() has thrown a QuerySyntaxException

org.hibernate.hql.ast.QuerySyntaxException
2 frames hidden
org.hibernate.hql.ast.tree.FromClause.addFromElement
64Web pages
QuerySyntaxExceptionFromClause.addFromElement64

Object references an unsaved transient instance

org.hibernate.TransientObjectException
org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved
62Web pages
1Solution
TransientObjectExceptionForeignKeys.getEntityIdentifierIfNotUnsaved62

SessionImpl.getEntityPersister() has thrown a MappingException

org.hibernate.MappingException
1 frames hidden
org.hibernate.internal.SessionImpl.getEntityPersister
62Web pages
MappingExceptionSessionImpl.getEntityPersister62

AbstractBatcher.executeBatch() has thrown a ConstraintViolationException

org.hibernate.exception.ConstraintViolationException
2 frames hidden
org.hibernate.jdbc.AbstractBatcher.executeBatch
62Web pages
ConstraintViolationExceptionAbstractBatcher.executeBatch62

DialectFactoryImpl.buildDialect() has thrown a HibernateException

org.hibernate.HibernateException
1 frames hidden
org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect
62Web pages
HibernateExceptionDialectFactoryImpl.buildDialect62

SessionImpl.flush() has thrown a StaleStateException

org.hibernate.StaleStateException
9 frames hidden
org.hibernate.impl.SessionImpl.flush
62Web pages
StaleStateExceptionSessionImpl.flush62

Configuration.configure() has thrown a HibernateException

org.hibernate.HibernateException
2 frames hidden
org.hibernate.cfg.Configuration.configure
61Web pages
HibernateExceptionConfiguration.configure61

Dialect.getHibernateTypeName() has thrown a MappingException

org.hibernate.MappingException
2 frames hidden
org.hibernate.dialect.Dialect.getHibernateTypeName
61Web pages
MappingExceptionDialect.getHibernateTypeName61

FromClause.addFromElement() has thrown a QuerySyntaxException

org.hibernate.hql.internal.ast.QuerySyntaxException
2 frames hidden
org.hibernate.hql.internal.ast.tree.FromClause.addFromElement
61Web pages
QuerySyntaxExceptionFromClause.addFromElement61

AbstractPersistentCollection.read() has thrown a LazyInitializationException

org.hibernate.LazyInitializationException
3 frames hidden
org.hibernate.collection.internal.AbstractPersistentCollection.read
61Web pages
LazyInitializationExceptionAbstractPersistentCollection.read61

Foreign non-null entity is not saved

org.hibernate.PropertyValueException
org.hibernate.engine.Nullability.checkNullability
60Web pages
PropertyValueExceptionNullability.checkNullability60

SessionFactoryImpl.getCurrentSession() has thrown a HibernateException

org.hibernate.HibernateException
1 frames hidden
org.hibernate.impl.SessionFactoryImpl.getCurrentSession
60Web pages
HibernateExceptionSessionFactoryImpl.getCurrentSession60

HqlSqlWalker.createFromElement() has thrown a QuerySyntaxException

org.hibernate.hql.internal.ast.QuerySyntaxException
3 frames hidden
org.hibernate.hql.internal.ast.HqlSqlWalker.createFromElement
59Web pages
QuerySyntaxExceptionHqlSqlWalker.createFromElement59

Configuration.validate() has thrown a MappingException

org.hibernate.MappingException
5 frames hidden
org.hibernate.cfg.Configuration.validate
59Web pages
MappingExceptionConfiguration.validate59
Nothing to list here.
Nothing to list here.
Nothing to list here.
Nothing to list here.