Uploaded image for project: 'Kafka Connector'
  1. Kafka Connector
  2. KAFKA-148

error: cannot be cast to class java.util.List

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.2.0
    • Component/s: Sink
    • None

      I get below error when I tried to use post-processing chain options I get below list error.

      {"error_code":500,"message":"class java.lang.String cannot be cast to class java.util.List (java.lang.String and java.util.List are in module java.base of loader 'bootstrap')"}

      My configuration:

      curl -X POST -H "Accept:application/json" -H "Content-Type: application/json" localhost:9083/connectors/ --data '{ "name":"mongo-sink-accounts-projections-mongos-demo2", "config": { "topics":"oplog.oz_mongo.oz_next.accounts", "connector.class":"com.mongodb.kafka.connect.MongoSinkConnector", "tasks.max":"1", "key.converter":"org.apache.kafka.connect.json.JsonConverter", "key.converter.schemas.enable":"false", "value.converter":"org.apache.kafka.connect.json.JsonConverter", "value.converter.schemas.enable":"false", "connection.uri":"mongodb://x.x.x.x:27017", "database":"poc_oz_next", "collection":"poc_accounts_projection_demo2", "max.num.retries":"3", "retries.defer.timeout":"5000", "session.timeout.ms":"25000", "document.id.strategy":"com.mongodb.kafka.connect.sink.processor.id.strategy.UuidStrategy", "post.processor.chain":"com.mongodb.kafka.connect.sink.processor.DocumentIdAdder,com.mongodb.kafka.connect.sink.processor.BlocklistValueProjector", "value.projection.type":"blocklist", "value.projection.list":"trial, entitlements, settings"} }'
      

       

      The document I am following: https://docs.mongodb.com/kafka-connector/master/kafka-sink-properties/#example-override-connector-sink-settings-on-topica

      Thanks,

      Rajaramesh

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            yaramati@adobe.com Rajaramesh Yaramati
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: