Skip to content

Tag Archives: exceptions

Understanding org.hibernate.TransientObjectException: object references an unsaved transient instance – save the transient instance before flushing:

Debugging Hibernate exceptions for users not so familiar with Hibernate can be frustrating. The following exception is a common source of error:- Lets try to understand the error with a use case first. The most common scenario when this exception occurs is while trying to save a collection object (but calling save/persist on parent) Consider [...]

Debugging java.sql.BatchUpdateException

If you ever encountered a BatchUpdateException, you probably realized how frustrating it is to debug the same. Unlike a jdbc exception where the stacktrace is fine grained to database errors, Batch exceptions encapsulate all the errors within and throw this rather “useless” message. There is nothing you can do about it unless you want to [...]