MongoDB Kafka Sink Connector - postprocessor post.processor.chain class not loading

170 views Asked by At

We are trying to implement Custom Postprocessor for Kafka MongoDB Sink connector. However, we are getting classname pattern not found error.

sink-connector.properties post.processor.chain=yyyy.kafka.mongodb.sink.postprocessor.xml.XMLParserPostProcessor

We are getting same error. Has anyone faced similar error before (class name pattern not found)

java.util.concurrent.ExecutionException: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s): Invalid value [yyyy.kafka.mongodb.sink.postprocessor.xml.XMLParserPostProcessor] for configuration post.processor.chain You can also find the above list of errors at the endpoint /connector-plugins/{connectorType}/config/validate     at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:115)     at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:99)     at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:118) Caused by: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s): Invalid value [yyyy.kafka.mongodb.sink.postprocessor.xml.XMLParserPostProcessor] for configuration post.processor.chain You can also find the above list of errors at the endpoint /connector-plugins/{connectorType}/config/validate

1

There are 1 answers

0
Ranga On

Changed the attributeMappings field to Public. The app configurations loaded from system properties. This resolved the issue.