"Error ORA-02290: check constraint X violated" in Hibernate application. What can I do to fix it?

Solution Verified - Updated -


When performing updates in database using Hibernate, we have the following exception:

ERROR [org.hibernate.util.JDBCExceptionReporter] (http- ORA-02290: check constraint {Constraint name} violated

And then the following error prevent the update to be finished:

ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (http- Could not synchronize database state with session

How to troubleshoot this problem?


  • JBoss Enterprise Application Platform 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In