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

ArrayIndexOutOfBoundsException when using Oracle driver ojdbc6 with DBAppender

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • logback-core
    • None
    • Windows XP, Oracle Database 11g Release 11.1.0.0.0, jdk1.6.0_16

    Description

      When using the Oracle driver ojdbc6 (11.1.0.7.0) an ArrayIndexOutOfBoundsException occurs when trying to write a log message to the database (see stacktrace below). I am using ch.qos.logback.core.db.DriverManagerConnectionSource in my logback.xml. When using ojdbc14 (10.2.0.4), this works fine.

      07:31:43,997 |-ERROR in ch.qos.logback.classic.db.DBAppender[LogDB] - problem appending event java.lang.ArrayIndexOutOfBoundsException: 10
      at java.lang.ArrayIndexOutOfBoundsException: 10
      at at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950)
      at at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623)
      at at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:1212)
      at at oracle.jdbc.driver.T4CPreparedStatement.<init>(T4CPreparedStatement.java:28)
      at at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68)
      at at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3140)
      at at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042)
      at at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:6022)
      at at ch.qos.logback.core.db.DBAppenderBase.append(DBAppenderBase.java:90)
      at at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:87)
      at at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:60)
      at at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:271)
      at at ch.qos.logback.classic.Logger.callAppenders(Logger.java:258)
      at at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
      at at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:394)
      at at ch.qos.logback.classic.Logger.debug(Logger.java:521)
      at at nz.co.integrationworks.reporting.AbstractReporter.log(AbstractReporter.java:37)
      at at nz.co.integrationworks.reporting.AbstractReporter.log(AbstractReporter.java:29)
      at at nz.co.integrationworks.reporting.BusinessLoggerManualTest.main(BusinessLoggerManualTest.java:28)

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            manuel Manuel Kueblboeck
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: