-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to do batch update using Hibernate
PostPosted: Tue Jul 12, 2005 12:43 am 
Beginner
Beginner

Joined: Tue Jun 21, 2005 2:21 am
Posts: 22
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.