-----Original Message-----
From: Les Hazlewood [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 2:51 PM
To: [EMAIL PROTECTED]
Subject: RE: [Hibernate] Bug with cursors?
Is this a Hibernate bug or an Oracle/JDBC problem?
The Oracle error message says you've exceeded the maximum number of open cursors allowed, due to the number of queries being executed. I think that means that you haven't configured Oracle to handle that many open cursors, or perhaps the Oracle JDBC driver can't handle it (classes12.zip?).
Any of the Hibernate guys want to answer?
I'm curious because we're using Oracle (even though we'll never execute that many queries on the JDBC side), and I'd like to know...
And of course, knowing is half the battle ;)
Les
> -----Original Message-----
> From: Germán Ruiz [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 06, 2003 11:58 AM
> To: [EMAIL PROTECTED]
> Subject: [Hibernate] Bug with cursors?
>
>
> Hi. I'm afraid I found a bug in the cursors release. It
> appears everytime
> I execute several queries (more than 1000) in the same
> session. I'm working with Hibernate 2.0.3, using jdbc driver
> for Oracle 8.1.7
>
> My code is something like this:
>
> Session session = factory.openSession();
> Query query = session.getNamedQuery("...");
> for (int pos = 0;pos++; pos < 3000)
> {
> query.setParameters(.....);
> Iterator it = query.list().iterator();
> while (it.hasNext())
> {
> //make something with it.next()
> }
> }
> session.close();
>
> It works fine, but as you can see, the list generated by the query is
> innecesary. I need only the iterator.
>
> If I change my code, getting de iterator from the query:
> Iterator it = query.iterate();
>
> I get this error:
>
> java.sql.SQLException: ORA-01000:
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
> at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:118)
> at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:466)
> at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:413)
> at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:432)
> at
> oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePrepar
> edStatement.java:182)
> at
> oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePrepar
> edStatement.java:165)
> at
> oracle.jdbc.driver.OracleConnection.privatePrepareStatement(Or
> acleConnection.java:608)
> at
> oracle.jdbc.driver.OracleConnection.prepareStatement(OracleCon
> nection.java:489)
> at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> com.mchange.v2.c3p0.stmt.GooGooStatementCache$2.run(GooGooStat
> ementCache.java:317)
> at
> com.mchange.v2.async.CarefulRunnableQueue$TaskThread.run(Caref
> ulRunnableQueue.java:145)
>
> Thanks!
>
> German
>
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> hibernate-devel mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>
Title: Message
Thanks
for the quick reply Gavin...I knew that was an extreme
case...
Les
- [Hibernate] Bug with cursors? Germán Ruiz
- Re: [Hibernate] Bug with cursors? Gavin King
- RE: [Hibernate] Bug with cursors? Les Hazlewood
- Les Hazlewood