Hi Mindy,
Had the very same problem myself (but with OJB 0.9.7 - not sure if it is
fixed now?). Tracked our problem down to the connection pooling. Open
cursors with oracle happen when the Statement is not closed properly, or
not at all. Closing single Connection objects does the job, as does
closing the Statement explictly. I'm guessing you don't want this though!
The old OJB connection pool, on receiving a 'close()' call, returned the
Connection to the pool. However it did *not* clean up after itself - in
other words the state of the Connection was not cleared properly and so
the Statements were left open. I suggest using the oracle thin driver
that has built in Connection pooling (ie the
oracle.jdbc.pool.OracleConnectionCacheImpl class - should be in your
oracle JDBC jar file), and *turning off* the OJB Connection pooling via
OJB.properties. I did this and it solved my cursor problems. At least if
you use oracle's connection pooling for an oracle DB you can blame them
for some things :-)
Finally if you really get stuck get one of your DBAs to fiddle with the
init.ora file and set the MAX_OPEN_CURSORS limit to be bigger than the
default (which is usually too small in any case).
Not seen this behaviour with other DBs, though.....
HTH,
Cheers,
Chris
Mindy Pereira wrote:
> I'm getting a collection beans using a QueryBySQL.
>
> Previously, it worked with no problems, however, when I added another
> filter to the data set ("where X = Y and Z = 2 and W = 3"), I got the
> following error:
>
> [org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR:
> ORA-01000: max
> imum open cursors exceeded
>
> Any help would be appreciated.
> Mindy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]