my db is oracle 9i ,when i use c3p0 for connection provider i can't update and insert the table record. but i use the hibernte defaut connection pool ,there is nothing error. here is the test code.
Code:
Session s = HibernateUtil.currentSession();
net.sf.hibernate.Transaction t = null;
try {
t = s.beginTransaction();
RLable rlable = new RLable();
rlable.setId("sdfsd5f");
rlable.setName("hello");
rlable.setAdlinks("sdfsdf");
s.save(rlable);
s.flush();
t.commit();
here is the exceptions:
Hibernate: insert into rlable (name, rdesc, isend, isallowcomment, checkswitch, contenturl, flashlink, adlinks, pid, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Problem with checked-in Statement, discarding.
java.lang.NullPointerException
at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)
at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528)
at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:3401)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.refreshStatement(GooGooStatementCache.java:452)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(GooGooStatementCache.java:138)
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$1$WrapperStatementHelper.doClose(C3P0PooledConnection.java:429)
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$2.close(C3P0PooledConnection.java:476)
at net.sf.hibernate.impl.BatcherImpl.closePreparedStatement(BatcherImpl.java:262)
at net.sf.hibernate.impl.BatcherImpl.closeStatement(BatcherImpl.java:136)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:125)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2417)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2367)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2236)
at com.rsys.rsys.dao.RLableDAO.main(RLableDAO.java:44)
java.lang.RuntimeException: Internal inconsistency: A (not new) checking-out statement is not in deathmarch.
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.undeathmarchStatement(GooGooStatementCache.java:437)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.removeStatement(GooGooStatementCache.java:273)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(GooGooStatementCache.java:146)
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$1$WrapperStatementHelper.doClose(C3P0PooledConnection.java:429)
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$2.close(C3P0PooledConnection.java:476)
at net.sf.hibernate.impl.BatcherImpl.closePreparedStatement(BatcherImpl.java:262)
at net.sf.hibernate.impl.BatcherImpl.closeStatement(BatcherImpl.java:136)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:125)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2417)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2367)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2236)
at com.rsys.rsys.dao.RLableDAO.main(RLableDAO.java:44)