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
|