Nullpointer exception when creating Kafka sink connector


I am getting null pointer exception when creating a Kafka Sink Connector. Below are the details. Can anyone help me what’s missing here to resolve this?

  1. Using Conflent Kafka latest version
  2. Installed Kafka Connector plugin using confluent hub.
  3. Creating connector using API. Below is the request and payload.
    http://localhost:8083/connectors (method POST)
	  "name": "orgunitsinc",
	  "config": {
  1. Here is the exception
[2020-11-12 19:50:09,467] INFO Cluster created with settings {hosts=[localhost:32771], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500} (org.mongodb.driver.cluster:71)

[2020-11-12 19:50:09,479] INFO Opened connection [connectionId{localValue:2, serverValue:16}] to localhost:32771 (org.mongodb.driver.connection:71)

[2020-11-12 19:50:09,482] INFO Monitor thread successfully connected to server with description ServerDescription{address=localhost:32771, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[4, 4, 1]}, minWireVersion=0, maxWireVersion=9, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=2095612} (org.mongodb.driver.cluster:71)

[2020-11-12 19:50:09,483] ERROR Uncaught exception in REST call to /connectors (


at org.apache.kafka.connect.runtime.WorkerConfigDecorator$MutableConfigInfos.lambda$removeAllWithName$0(

at org.apache.kafka.connect.runtime.WorkerConfigDecorator$MutableConfigInfos.removeAll(

at org.apache.kafka.connect.runtime.WorkerConfigDecorator$MutableConfigInfos.removeAllWithName(

at org.apache.kafka.connect.runtime.WorkerConfigDecorator$DecorationPattern.filterValidationResults(

at org.apache.kafka.connect.runtime.WorkerConfigDecorator.lambda$decorateValidationResult$5(

at java.util.Collections$SingletonList.forEach(

at org.apache.kafka.connect.runtime.WorkerConfigDecorator.decorateValidationResult(

at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(

at org.apache.kafka.connect.runtime.AbstractHerder.lambda$validateConnectorConfig$1(

at java.util.concurrent.Executors$


at java.util.concurrent.ThreadPoolExecutor.runWorker(

at java.util.concurrent.ThreadPoolExecutor$


Hi @venkat_utla,

I’m not sure what is going on or why the connectors rest call is throwing a NPE. Could I ask you to open up a bug ticket on the project Jira page?

That way I can investigate and keep you in the loop with any findings. It could be a connector issue, a Kafka connect issue or some other integration issue. Definitely a bug somewhere and I’m happy to help resolve it / find a work around for you.


Also experiencing this exact issue. Did you resolve in the end @venkat_utla?

I wonder if it’s related to Confluent Platform 6.0 / Apache Kafka 2.6? This looks like the same issue:

Another user experiencing the same issue:


I solved the problem by indicating security protocol:


Where and how should this setting “”: “PLAINTEXT” be set?
And should the value be PLAINTEXT or PLAIN?

In the end, I got my sink connector working with an Atlas cluster after I installed confluent 6.1.0 and mongodb kafka connector 1.3.0 instead of 1.4.0.