-->
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.  [ 3 posts ] 
Author Message
 Post subject: Could not execute JDBC batch update
PostPosted: Thu Nov 09, 2006 3:39 am 
Newbie

Joined: Mon Nov 06, 2006 3:43 am
Posts: 6
Hi i am new to Hibernate .I am using WSAD 5.1.1 and DB2.I am getting the following exception while trying to insert data first time .but if i try next time with same data i am able to insert and i did not get any exception. help me to solve this exception .

Thanks



[11/9/06 12:58:57:340 IST] 2a806e7c JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -99999, SQLState: null
[11/9/06 12:58:57:355 IST] 2a806e7c JDBCException E net.sf.hibernate.util.JDBCExceptionReporter Non-atomic batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch. Use getNextException() to retrieve the exceptions for specific batched elements.
[11/9/06 12:58:57:355 IST] 2a806e7c JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -301, SQLState: 07006
[11/9/06 12:58:57:965 IST] 2a806e7c JDBCException E net.sf.hibernate.util.JDBCExceptionReporter Error for batch element #0: The value of input host variable or parameter number "9" cannot be used because of its data type.
[11/9/06 12:58:57:980 IST] 2a806e7c JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -99999, SQLState: null
[11/9/06 12:58:57:980 IST] 2a806e7c JDBCException E net.sf.hibernate.util.JDBCExceptionReporter Non-atomic batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch. Use getNextException() to retrieve the exceptions for specific batched elements.
[11/9/06 12:58:57:980 IST] 2a806e7c JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: -301, SQLState: 07006
[11/9/06 12:58:58:012 IST] 2a806e7c JDBCException E net.sf.hibernate.util.JDBCExceptionReporter Error for batch element #0: The value of input host variable or parameter number "9" cannot be used because of its data type.
[11/9/06 12:58:58:027 IST] 2a806e7c SessionImpl E net.sf.hibernate.impl.SessionImpl Could not synchronize database state with session
[11/9/06 12:58:58:043 IST] 2a806e7c SystemErr R net.sf.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 7:30 am 
Beginner
Beginner

Joined: Fri Oct 06, 2006 7:11 am
Posts: 32
Check the data types of the record you are trying to insert. It looks like you have defined the wrong data type eg trying to insert a String where you have defined the field as an Integer


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 8:12 am 
Newbie

Joined: Mon Nov 06, 2006 3:43 am
Posts: 6
Hi knoxor ...

Everything fine. See if i am trying second time with same data it is working fine.


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

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.