RE: maximum open cursors exceeded (with Stored Procedure)

From: Pirola Davide (davide.pirol..tin.it)
Date: Mon Feb 07 2005 - 11:49:40 EST

  • Next message: Andrus Adamchik: "Re: maximum open cursors exceeded (with Stored Procedure)"

    Hi,
    i have another problem.
    If i make a loop (for test) that perform a query(stored procedure with out cursor parameter) and try valorize my java object i get this error (after a few time):

    -----------------------------------------------------------------
    INFO QueryLogger: *** error.
    java.sql.SQLException: Ref cursor is invalid
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
            at oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.java:3847)
            at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:6039)
            at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:5827)
            at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:698)
            at com.caucho.sql.UserCallableStatement.getObject(UserCallableStatement.java:333)
            at org.objectstyle.cayenne.dba.oracle.OracleDataNode.readStoredProcedureOutParameters(OracleDataNode.java:138)
            at org.objectstyle.cayenne.access.DataNode.runStoredProcedure(DataNode.java:644)
            at org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:345)
            at org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:654)
            at org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1408)
            at org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:179)
            at org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1366)
            at org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1463)
            at it.telecomitalia.rossoalice.aa.loaders.generic.GenericLoader.getTypesFromCursor(GenericLoader.java:122)
            at it.telecomitalia.rossoalice.aa.loaders.detail.ChannelLoader.load(ChannelLoader.java:41)
            at _jsp._jsp._testCayenneLoop__jsp._jspService(_testCayenneLoop__jsp.java:39)
            at com.caucho.jsp.JavaPage.service(JavaPage.java:61)
            at com.caucho.jsp.Page.pageservice(Page.java:569)
            at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:149)
            at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:163)
            at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:208)
            at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
            at com.caucho.server.port.TcpConnection.run(TcpConnection.java:332)
            at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:457)
            at com.caucho.util.ThreadPool.run(ThreadPool.java:398)
            at java.lang.Thread.run(Thread.java:595)

    -----------------------------------------------------------------

    If i call one time the same code, it's works fine.

    Please help!!

    Thank's
    Davide

    -----Original Message-----
    From: Pirola Davide
    Sent: venerd́ 4 febbraio 2005 15.46
    To: 'cayenne-use..bjectstyle.org'
    Subject: RE: maximum open cursors exceeded (with Stored Procedure)

    Hi,
    as usually yours suggests are great!

    Thank's
    Davide

    -----Original Message-----
    From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Sent: venerd́ 4 febbraio 2005 15.28
    To: cayenne-use..bjectstyle.org
    Subject: Re: maximum open cursors exceeded (with Stored Procedure)

    Hi Davide,

    It's a bug - http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-255

    You can download patched 1.1 jar from here:

    http://objectstyle.org/downloads/cayenne/patched/CAY-255/cayenne.jar

    Andrus

    > Hi,
    > i have found this error when i execute my code in a loop.
    > I must close open cursors?
    > Where i can make this?
    >
    > Thank's
    > Davide
    >
    > -------------------------------------------------------------------------------------------
    > INFO QueryLogger: *** error.
    > java.sql.SQLException: ORA-01000: maximum open cursors exceeded
    > ORA-06512: at "AUTHORIZATION_MANAGER.AUTHORIZATION", line 926
    > ORA-06512: at line 1
    >
    > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at
    > oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    > at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    > at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    > at
    > oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    > at
    > oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
    > at
    > oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
    > at
    > oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
    > at
    > oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
    > at
    > oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:685)
    > at
    > org.objectstyle.cayenne.access.DataNode.runStoredProcedure(DataNode.java:640)
    > .....
    > -------------------------------------------------------------------------------------------



    This archive was generated by hypermail 2.0.0 : Mon Feb 07 2005 - 11:48:59 EST