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

NullPointerException is thrown because DebeziumHeaderProducer is not registered

XMLWordPrintable

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      Debezium IBMI Connector with the Debezium Embedded Engine, version 3.2.0.Final.

      What is the connector configuration?

      props.setProperty("name", "debezium-as400");
      props.setProperty("connector.class", "io.debezium.connector.db2as400.As400RpcConnector");
      props.setProperty("offset.storage.file.filename", "C:/testDBZ/ntv/ibmi/offset.dat");
      props.setProperty("offset.flush.interval.ms", "1000");
      props.setProperty("database.hostname", "pub400.com");
      props.setProperty("database.port", "446");
      props.setProperty("database.dbname", "Pub400");
      props.setProperty("database.user", "TES");
      props.setProperty("database.password", "******");
      props.setProperty("database.schema", "TES2");
      props.setProperty("topic.prefix", "dbz_test");
      props.setProperty("database.secure", "false");
      props.setProperty("converter.schemas.enable", "false");
      props.setProperty("table.include.list", "TES2.EMPLOYEES");

      What is the captured database version and mode of deployment?

      pub400

      What behavior do you expect?

      To retrieve the events.

      What behavior do you see?

      Regardless of the snapshot.mode configuration, every time the engine captures/processes an event, it throws a NullPointerException, and no events are retrieved.

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

      yes, with version 3.2.0.Final. The last version that I tested and is working is version 3.2.0.Alpha1

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

      dbz_ibmi_3.2.0.Final.log

      How to reproduce the issue using our tutorial deployment?

      More info in here:

      https://debezium.zulipchat.com/#narrow/channel/433074-community-ibmi/topic/.22this.2EdebeziumHeaderProducer.22.20is.20null.20in.20version.203.2E2.2E0.2EFinal/with/529018894 

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      <Your answer>

      Implementation ideas (optional)

      I was able to resolve it by adding the following line in the AS400ConnectorTask within the registerServiceProviders method:
      serviceRegistry.registerServiceProvider(new DebeziumHeaderProducerProvider());

          @Override
          protected void registerServiceProviders(ServiceRegistry serviceRegistry) {
              serviceRegistry.registerServiceProvider(new PostProcessorRegistryServiceProvider());
              serviceRegistry.registerServiceProvider(new DebeziumHeaderProducerProvider()); // added this line in here
          } 

              Unassigned Unassigned
              jona-r-h jona j
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: