-->
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: about db2 update
PostPosted: Thu Jan 08, 2009 10:01 pm 
Newbie

Joined: Thu Jan 08, 2009 9:20 pm
Posts: 1
hello,

I have a spring+hibernate+db2 project

at first,I use mysql,All normal.When I change to db2 I can insert and delete,but can not update.

my code: public void update(User user) {
getHibernateTemplate().update(user);
System.out.println("update....");
}
the "update..." can show in con,at same time the error show in con

Hibernate: update user set loginname=?, realname=?, password=?, phone=?, address=?, hsdw=?, cxid=?, regtime=? where id=?
2009-01-09 10:00:44,281 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <SQL Error: -99999, SQLState: null>
2009-01-09 10:00:44,281 ERROR [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.>
2009-01-09 10:00:44,281 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <SQL Error: -301, SQLState: 07006>
2009-01-09 10:00:44,281 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] - <Error for batch element #0: DB2 SQL error: SQLCODE: -301, SQLSTATE: 07006, SQLERRMC: 8>
2009-01-09 10:00:44,281 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <SQL Error: -99999, SQLState: null>
2009-01-09 10:00:44,281 ERROR [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.>
2009-01-09 10:00:44,281 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <SQL Error: -301, SQLState: 07006>
2009-01-09 10:00:44,281 ERROR [net.sf.hibernate.util.JDBCExceptionReporter] - <Error for batch element #0: DB2 SQL error: SQLCODE: -301, SQLSTATE: 07006, SQLERRMC: 8>
2009-01-09 10:00:44,281 ERROR [net.sf.hibernate.impl.SessionImpl] - <Could not synchronize database state with session>
2009-01-09 10:00:44,281 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <SQL Warning: 0, SQLState: null>
2009-01-09 10:00:44,281 WARN [net.sf.hibernate.util.JDBCExceptionReporter] - <Connection readOnly mode is not enforcable after the connection has been established. To enforce a read only connection, set the readOnly data source or connection property.>
2009-01-09 10:00:44,296 ERROR [org.springframework.web.servlet.DispatcherServlet] - <Could not complete request>
org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [] in task 'HibernateTemplate'; nested exception is com.ibm.db2.jcc.b.vd: 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.
com.ibm.db2.jcc.b.vd: 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.

pls help me thanks


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.