Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added section for common error messages

...

HQL is a SQL-like query language that references hibernate object properties rather that table column names.

Common Hibernate Error Messages

LazyInitializationException

For example: LazyInitializationException: failed to lazily initialize ... could not initialize proxy - no Session

StaleStateException

For example: StaleStateException: Batch update returned unexpected row count from update

  • This error means that your Hibernate tried to update an object that either no longer exists in the Database, or the update already previous occurred. In other words, the state of this object was "stale" in the Hibernate cache, and its state in the Database was different.
  • In DSpace, this may mean that Context.commit() should have been called previously to save the object in question (and ensure the cache and database are synced).

Hibernate Resources