Re: Problem with Oracle Driver

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jan 20 2005 - 13:39:57 EST

  • Next message: Elia Morling: "Need Help: Cayenne Freezes"

    Here is stripped down code that handles stored procedure execution:

    boolean hasResultSet = statement.execute();
    while (true) {
       if (hasResultSet) {
          ResultSet rs = statement.getResultSet();
          // ...
       } else {
          int updateCount = statement.getUpdateCount();
          if (updateCount == -1) {
             break;
          }

          // ...
       }
       hasResultSet = statement.getMoreResults();
    }

    So there is a chance of an infinite loop if a driver misbehaves (i.e.
    never resets the update count no matter how many times you read it). Could
    you open a bug report in Jira indicating:

    - Exact Oracle driver version
    - Oracle DB version
    - Full source of the stored procedure (doesn't matter what tables it
    accesses, what's important is control flow)
    - Cayenne/Java code sample calling the procedure.

    I'll take a look.

    Andrus

    > Hi,
    > i have found a strange error when i use JDBC 3.0 Oracle drivers.
    > When i execute a Stored Procedure whit this drivers, Cayenne go in loop,
    > and print this kind of log :
    >
    > ------------------------------------------------------------------------------------------------------------------------
    > Password: *******
    > INFO QueryLogger: +++ Connecting: SUCCESS.
    > INFO QueryLogger: {call LOGIN(?, ?, ?, ?)} [bind: 'smith', '[OUT]',
    > '[OUT]', '[OUT]']
    >
    > INFO QueryLogger: === returned 1 row. - took 16 ms.
    > INFO QueryLogger: === returned 1 row. - took 16 ms.
    > INFO QueryLogger: === updated 1 row.
    > INFO QueryLogger: === updated 1 row.
    > INFO QueryLogger: === updated 1 row.
    > INFO QueryLogger: === updated 1 row.
    > ...
    > ...
    > ...
    > ------------------------------------------------------------------------------------------------------------------------
    > .. infinite loop whit "INFO QueryLogger: === updated 1 row" as a log.
    >
    > If i use "classes12.zip" instead, it works.
    >
    > Anyone have suggest?
    >
    > Thank's
    > Davide



    This archive was generated by hypermail 2.0.0 : Thu Jan 20 2005 - 13:39:59 EST