Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-121

Problems getting autogenerated Keys in Oracle with Oracle JDBC 10.2.03

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      None
    • Environment:

      Operating System: Windows
      Platform: PC

    • Bugzilla Id:
      57

      Description

      I've encountered troubles logging StackTrace/MDC entries with die DBAppender on our plattform! We are using Oracle 9.2.0.6.0 on a Solaris Box with Oracle JDBC Driver 10.2.0.3!

      I've debugged the processing of LogMessages into DBAppenderBase.append()!

      There I found a call "con.prepareStatement(getInsertSQL())" which is followed by a call "subAppend(...)"

      As far as I understand Oracle Drivers return generatedKeys only, if you use the right prepareStatement() methods, which is in my understanding the following:

      PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
      throws SQLException
      @see http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#prepareStatement(java.lang.String,%20int)
      which is available since JDK 1.4

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              klaus@ungers-online.com Klaus Unger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: