wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Integrity constraint in Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Integrity constraint in Hibernate" Watch "Integrity constraint in Hibernate" New topic
Author

Integrity constraint in Hibernate

G. Prasad
Greenhorn

Joined: Feb 18, 2012
Posts: 1
I m Even facing the same error ...



I don know why even the FK of Song details are matching with the Pk of the Album i mm getting the below mentioned error:

java.sql.BatchUpdateException: ORA-02291: integrity constraint (SONGSLIB.SONGSDETAIL_ALBUM_FK1) violated - parent key not found

at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10070)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:213)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at com.gp.songslib.dao.impl.SaveSongsInfoDaoImpl.saveAlbum(SaveSongsInfoDaoImpl.java:35)
at mysonglibrary.MySongLibrary.main(MySongLibrary.java:31)

While debugging i found it's coming when i m going for flush or commit.

DB : Oracle

DLL OF ALBUM :


DLL of SongDetails :
Rachna Jotwani
Greenhorn

Joined: Apr 17, 2012
Posts: 2
I am getting the same error. is there any updtae on how to fix this error?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Integrity constraint in Hibernate
 
Similar Threads
could not parse mapping resource.
Exception "javax.persistence.EntityNotFoundException: Unable to find ParkingSpace with 3
Help. Problem inserting Clob into Oracle 9i
multi-line regex match
data provider insert into a table