Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-7737

Column CON_ID queried on V$THREAD is not available in Oracle 11

XMLWordPrintable

    • False
    • None
    • False

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      debezium-connector-oracle version 2.6.0.Final

      What is the connector configuration?

      {
        "name": "source-test-connector",
        "config": {
          "connector.class": "io.debezium.connector.oracle.OracleConnector",
          "tasks.max": "1",
          "database.hostname": "oracle",
          "database.port": "1521",
          "database.user": "c##dbzuser",
          "database.password": "dbz",
          "database.dbname": "orclcdb",
          "database.pdb.name": "orclpdb1",
          "database.connection.adapter": "logminer",
          "topic.prefix": "dbz",
          "schema.name.adjustment.mode": "avro",
          "table.include.list": "C##DBZUSER.TEST_TABLE",
          "include.schema.changes": "false",
          "schema.history.internal.kafka.bootstrap.servers" : "kafka:9092",
          "schema.history.internal.kafka.topic": "schema-changes.test",
          "heartbeat.interval.ms": "60000",
          "log.mining.strategy": "online_catalog",
          "log.mining.query.filter.mode": "in",
          "custom.metric.tags": "connector=source-test-connector",
          "key.converter": "io.confluent.connect.avro.AvroConverter",
          "key.converter.schema.registry.url": "http://schema-registry:8081",
          "value.converter": "io.confluent.connect.avro.AvroConverter",
          "value.converter.schema.registry.url": "http://schema-registry:8081"
        }
      }
      

      What is the captured database version and mode of deployment?

      Oracle Database 11, Docker

      What behaviour do you expect?

      OracleConnector can be run on Oracle 11.

      What behaviour do you see?

      OracleConnector crashes with the following error:

      Caused by: java.sql.SQLException: Invalid column name
              at oracle.jdbc.driver.OracleStatement.getColumnIndexPrimitive(OracleStatement.java:4257)
              at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:4215)
              at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:299)
              at oracle.jdbc.driver.GeneratedResultSet.getLong(GeneratedResultSet.java:626)
              at io.debezium.connector.oracle.OracleConnection.lambda$getRedoThreadState$35(OracleConnection.java:813)
              at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:646)
              at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:514)
              at io.debezium.connector.oracle.OracleConnection.getRedoThreadState(OracleConnection.java:787)
              ... 12 more
      

      when I try to run it on Oracle 11, because in Oracle 11 view V$THREAD does not contain column CON_ID that is used in Debezium code.

      Oracle 11: https://devdoc.net/database/OracleDoc_11gR2/server.112/e25513/dynviews_3109.htm
      Oracle 12: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/refrn/V-THREAD.html#GUID-D1A0B100-BE3F-4098-8E71-719B7CCCFF4B

      Do you see the same behaviour using the latest relesead Debezium version?

      Yes

      Do you have the connector logs, ideally from start till finish?

      [2024-04-03 11:03:51,407] ERROR [QUORUM_CRM8_SOURCE|task-0] WorkerSourceTask{id=QUORUM_CRM8_SOURCE-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:212)
      org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped.
              at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:67)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:267)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:61)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(ChangeEventSourceCoordinator.java:280)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(ChangeEventSourceCoordinator.java:197)
              at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:140)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: io.debezium.DebeziumException: Failed to read the Oracle database redo thread state
              at io.debezium.connector.oracle.OracleConnection.getRedoThreadState(OracleConnection.java:822)
              at io.debezium.connector.oracle.logminer.LogFileCollector.getLogs(LogFileCollector.java:80)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.initializeRedoLogsForMining(LogMinerStreamingChangeEventSource.java:402)
              at io.debezium.connector.oracle.logminer.LogMinerStreamingChangeEventSource.execute(LogMinerStreamingChangeEventSource.java:178)
              ... 9 more
      Caused by: java.sql.SQLException: Invalid column name
              at oracle.jdbc.driver.OracleStatement.getColumnIndexPrimitive(OracleStatement.java:4257)
              at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:4215)
              at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:299)
              at oracle.jdbc.driver.GeneratedResultSet.getLong(GeneratedResultSet.java:626)
              at io.debezium.connector.oracle.OracleConnection.lambda$getRedoThreadState$35(OracleConnection.java:813)
              at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:646)
              at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:514)
              at io.debezium.connector.oracle.OracleConnection.getRedoThreadState(OracleConnection.java:787)
              ... 12 more
      

      Feature request or enhancement

      https://github.com/debezium/debezium/pull/5450

              Unassigned Unassigned
              andrey.pustovetov@gmail.com Andrey Pustovetov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: