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

NullPointer exception on Final stage of snapshot for Oracle connector

XMLWordPrintable

    • False
    • False
    • Hide

      Configure debezium server to connect to Oracle and publish on kafka.

       

      debezium.sink.type=kafka
      debezium.sink.kafka.producer.bootstrap.servers=<kafka-brokers>
      debezium.sink.kafka.producer.key.serializer=org.apache.kafka.common.serialization.StringSerializer
      debezium.sink.kafka.producer.value.serializer=io.confluent.kafka.serializers.KafkaAvroSerializer
      debezium.sink.kafka.producer.schema.registry.url=<schema-registry-url>
      debezium.source.connector.class=io.debezium.connector.oracle.OracleConnector
      debezium.source.offset.storage.file.filename=data/offsets.dat
      debezium.source.offset.flush.interval.ms=0
      debezium.source.database.hostname=<oracle-host>
      debezium.source.database.port=<oracle-port>
      debezium.source.database.user=<debezium user>
      debezium.source.database.password=<debezium pwd>
      debezium.source.database.dbname=fospre
      debezium.source.database.server.name=fospre
      debezium.source.schema.include.list=SCHEMA1,SCHEMA2,SCHEMA3
      quarkus.log.console.json=false
      value.converter=io.confluent.connect.avro.AvroConverter
      value.converter.schema.registry.url=<schema_registry_url>

      debezium.source.database.snapshot.mode=schema_only
      debezium.source.database.snapshot.locking.mode=none
      debezium.source.table.whitelist=SCHEMA1.TABLE1, SCHEMA2.TABLE1, SCHEMA3.TABLE1

      event.processing.failure.handling.mode=warn
      debezium.source.database.history.kafka.bootstrap.servers=<kafka-broker>
      debezium.source.database.history.kafka.topic=es-debezium-history-topic

      Show
      Configure debezium server to connect to Oracle and publish on kafka.   debezium.sink.type=kafka debezium.sink.kafka.producer.bootstrap.servers=<kafka-brokers> debezium.sink.kafka.producer.key.serializer=org.apache.kafka.common.serialization.StringSerializer debezium.sink.kafka.producer.value.serializer=io.confluent.kafka.serializers.KafkaAvroSerializer debezium.sink.kafka.producer.schema.registry.url=<schema-registry-url> debezium.source.connector.class=io.debezium.connector.oracle.OracleConnector debezium.source.offset.storage.file.filename=data/offsets.dat debezium.source.offset.flush.interval.ms=0 debezium.source.database.hostname=<oracle-host> debezium.source.database.port=<oracle-port> debezium.source.database.user=<debezium user> debezium.source.database.password=<debezium pwd> debezium.source.database.dbname=fospre debezium.source.database.server.name=fospre debezium.source.schema.include.list=SCHEMA1,SCHEMA2,SCHEMA3 quarkus.log.console.json=false value.converter=io.confluent.connect.avro.AvroConverter value.converter.schema.registry.url=<schema_registry_url> debezium.source.database.snapshot.mode=schema_only debezium.source.database.snapshot.locking.mode=none debezium.source.table.whitelist=SCHEMA1.TABLE1, SCHEMA2.TABLE1, SCHEMA3.TABLE1 event.processing.failure.handling.mode=warn debezium.source.database.history.kafka.bootstrap.servers=<kafka-broker> debezium.source.database.history.kafka.topic=es-debezium-history-topic

      I'm running debezium 1.8.0.Alpha2 against an Oracle instance,

      using ojbc8jar ( running under jdk-11 ), and an NPE is thrown

       

      2021-11-29 14:17:30,485 INFO  [io.deb.con.ora.OracleSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) No previous offset has been found. 
      2021-11-29 14:17:30,489 INFO  [io.deb.con.ora.OracleSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) According to the connector configuration both schema and data will be snapshot. 
      2021-11-29 14:17:30,490 INFO  [io.deb.rel.RelationalSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) Snapshot step 1 - Preparing 
      2021-11-29 14:17:30,490 INFO  [io.deb.rel.RelationalSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) Snapshot step 2 - Determining captured tables 
      2021-11-29 14:17:31,716 INFO  [io.deb.rel.RelationalSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) Snapshot step 3 - Locking captured tables [FOSPRE.AUD_ADMIN.AUD_ACCESS_RECORD, FOSPRE.LOAN_ADMIN.AUD_OPENINGS, FOSPRE.INGFOS.PERSON] 
      2021-11-29 14:17:31,727 INFO  [io.deb.rel.RelationalSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) Snapshot step 4 - Determining snapshot offset 
      2021-11-29 14:17:31,880 INFO  [io.deb.con.ora.OracleSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) No latest table SCN could be resolved, defaulting to current SCN 2021-11-29 14:17:31,916 INFO  [io.deb.rel.RelationalSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) Snapshot step 5 - Reading structure of captured tables 
      2021-11-29 14:17:34,465 INFO  [io.deb.rel.RelationalSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) Snapshot step 6 - Persisting schema history 
      2021-11-29 14:17:34,470 INFO  [io.deb.pip.sou.AbstractSnapshotChangeEventSource] (debezium-oracleconnector-fospre-change-event-source-coordinator) Snapshot - Final stage 
      2021-11-29 14:17:34,470 ERROR [io.deb.pip.ErrorHandler] (debezium-oracleconnector-fospre-change-event-source-coordinator) Producer failure: io.debezium.DebeziumException: java.lang.NullPointerException
           at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:80)
           at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:118)
           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: java.lang.NullPointerException
           at io.debezium.relational.RelationalSnapshotChangeEventSource.createSchemaChangeEventsForTables(RelationalSnapshotChangeEventSource.java:277)
           at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:124)
           at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:71)
           ... 6 more

      Thus not allowing to start working.

       

      I'm running debezium-server, with these additional libraries :

       

      ojdbc8-19.3.0.0.jar
      kafka-avro-serializer-6.2.0.jar
      kafka-schema-serializer-6.2.0.jar
      kafka-schema-registry-client-6.2.0.jar
      debezium-connector-oracle-1.8.0.Alpha2.jar

            ccranfor@redhat.com Chris Cranford
            muallin@gmail.com jose luis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: