-->
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.  [ 9 posts ] 
Author Message
 Post subject: Delete Object error
PostPosted: Tue Aug 31, 2004 9:47 am 
Newbie

Joined: Tue Jul 27, 2004 1:28 pm
Posts: 5
[b]Hibernate version:2.1.4


I am trying do delete the rows . When I doing this I am getting this error
oracle.jdbc.dbaccess.DBData.clearItemProblem 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).


This is code snippet


tx = session.beginTransaction();
session.delete("from com.birch.vitria.blq.persistentobjects.LoopQualResponse lqr where lqr.qualificationRequest.qualificationRequestId=" +440);

commitTransaction.


Any help would be greatly apppreciated.

Nandhu


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2004 10:56 am 
Regular
Regular

Joined: Mon Feb 23, 2004 10:42 pm
Posts: 102
Location: Washington DC
Is oracle.jdbc.dbaccess.DBData your own package?

What SQL does hibernate generate? Please post the entire stack trace.

_________________
Matt Veitas


Top
 Profile  
 
 Post subject: Delete Object error
PostPosted: Tue Aug 31, 2004 11:05 am 
Newbie

Joined: Tue Jul 27, 2004 1:28 pm
Posts: 5
Here is entire stack trace

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(OraclePreparedStatemen
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.refreshStatement(GooGooStatementCac
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkinStatement(GooGooStatementCac
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$1WrapperStatementHelper.doClose(C3P
at com.mchange.v2.c3p0.impl.C3P0PooledConnection$2.close(C3P0PooledConnection.java:5
at net.sf.hibernate.impl.BatcherImpl.closePreparedStatement(BatcherImpl.java:270)
at net.sf.hibernate.impl.BatcherImpl.closeStatement(BatcherImpl.java:140)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:129)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2421)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2376)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2004 11:17 am 
Regular
Regular

Joined: Mon Feb 23, 2004 10:42 pm
Posts: 102
Location: Washington DC
What version of Oracle?

What is the generated SQL from Hibernate?

_________________
Matt Veitas


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 01, 2004 3:05 pm 
Newbie

Joined: Tue Jul 27, 2004 1:28 pm
Posts: 5
Oracle Version 9.2


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 08, 2004 9:41 am 
Beginner
Beginner

Joined: Sat Sep 04, 2004 7:07 am
Posts: 20
Location: Helsinki, Finland
There's a bug in the 9.2.0.1 Oracle jdbc-driver, newer versions (downloadable at Oracle) don't do this.

Risto

_________________
Risto


Top
 Profile  
 
 Post subject: So did you reach a solution?
PostPosted: Mon Nov 29, 2004 9:58 am 
Newbie

Joined: Sun Jan 18, 2004 4:05 pm
Posts: 5
I'm using Oracle 8.1.7 and the latest 8.1.7 driver classes12.zip, and I'm getting the same error, when I check the logs the produced SQL is correct, Hibernate actually goes through the whole list deleting one by one and then commits, but I get this error and the records are still there.

Did you ever reach a solution, the previous version of the Oracle driver (classes11.zip) is ancient, I don't want to have to go back to it unless I absolutluy have to.

Thanks

Nader Henein


Top
 Profile  
 
 Post subject: Oracle ojdbc14.jar
PostPosted: Mon Nov 29, 2004 2:33 pm 
Newbie

Joined: Mon Nov 29, 2004 2:14 pm
Posts: 1
I had the same problem with a simple insert. The insert committed fine but I still got the stack trace. I upgraded my Oracle JDBC driver to ojdbc14.jar (otn.oracle.com) and it resolved the problem completely.

Charlie


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 01, 2004 6:56 am 
C3P0 Developer
C3P0 Developer

Joined: Tue Jan 06, 2004 8:58 pm
Posts: 145
I do think that it is an oracle bug -- PreparedStatements.clearParameters() really oughtn't throw an Exception -- but if you can't upgrade to a version where this doesn't happen, you can work around the problem by setting hibernate.c3p0.max_statements to zero, thus turning off statement caching. It is the statement cache that calls clearParameters(), so that future clients to the cached preparedStatements don't see stale parameters.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 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.