I'm facing some problem while doing batch update .Exception reads this
[java] Hibernate: insert into CHILD (name, ID) values (?, ?)
[java] org.hibernate.exception.GenericJDBCException: Could not execute JDBC
ch update
[java] at org.hibernate.exception.ErrorCodeConverter.handledNonSpecific
ption(ErrorCodeConverter.java:92)
[java] at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeC
rter.java:80)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExcep
Helper.java:43)
[java] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatch
ava:181)
[java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.j
226)
[java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.j
136)
[java] at org.hibernate.event.def.AbstractFlushingEventListener.perform
utions(AbstractFlushingEventListener.java:274)
[java] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(Def
FlushEventListener.java:27)
[java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
[java] at ParentManager.createAndStore(ParentManager.java:31)
[java] at ParentManager.main(ParentManager.java:13)
[java] Caused by: java.sql.BatchUpdateException: failed batch
[java] at org.hsqldb.jdbc.jdbcStatement.executeBatch(Unknown Source)
[java] at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(Unknown So
)
[java] at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBat
.java:57)
[java] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatch
ava:174)
[java] ... 7 more
i want to persist record in two tables using single transaction .
I have a Table Parent ,primary key of that is a foreig key for CHILD table
Kindly help me in solving this problem .
Thanks
Balaji
|