JDBCException « Insert « JPA Q&A





1. net.sf.hibernate.JDBCException: could not insert:    forum.hibernate.org

Hi Guys, I have used Hibernate for the first time today and have gotten quite far :) Excellent piece of kit. I have 2 classes Schedules and DataAcquisitionSchedules. The latter extends the former. I wanted this to go into per-class and used a joined-subclass. My configuration was successful in creating the 2 tables but when it tries to insert into the ...

2. net.sf.hibernate.JDBCException: could not insert    forum.hibernate.org

Hi My application executed successfully with mysql4.1,hibernate2 on tomcat5.0 but now i am migrate the mysql4.1 to mysql5.0.While executing application on mysql5.0 it throws the following exception 1.net.sf.hibernate.JDBCException: could not insert: [com.panduit.acmnms.db.Location#-1] 2.java.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails (`acmnms/locationindex`, CONSTRAINT `locationindex_ibfk_1` FOREIGN KEY (`locationID`) REFERENCES `location` (`locationID`)) Let me know how could i rectify ...