Unable to configure couchbase.event.filter

I am unable to configure couchbase.event.filter. I get the following error:
“Class com.couchbase.connect.kafka.example.CustomFilter could not be found”

I configure my connector using the following API:
‘{
“connector.class”: “com.couchbase.connect.kafka.CouchbaseSourceConnector”,
“couchbase.seed.nodes”:“”,
“tasks.max”:“2”,
“couchbase.topic”:“tp_optima_contact”,
“couchbase.bucket”:“optima_contact”,
“couchbase.username”:“admin”,
“couchbase.password”:“”,
“key.converter”:“org.apache.kafka.connect.storage.StringConverter”,
“couchbase.event.filter”:“com.couchbase.connect.kafka.example.CustomFilter”,
“couchbase.custom.filter.field”:“/type”,
“couchbase.custom.filter.values”:“individual”,
“couchbase.source.handler”:“com.couchbase.connect.kafka.handler.source.RawJsonSourceHandler”,
“value.converter”:“org.apache.kafka.connect.converters.ByteArrayConverter”,
“couchbase.persistence.polling.interval”:“100ms”,
“couchbase.flow.control.buffer”:“16m”,
“couchbase.stream.from”:“BEGINNING”
}’

I have ensured that my plugin.path includes the JAR file having the class file for filtration.
I have also set the CLASSPATH to the this location in my .bash_profile

Hi @asimsp – welcme to the Couchbase Forum!

Instead of putting the jar in a plugin path location, you might need to put it in the same directory as the Couchbase connector jars.

Thanks,
David

Thank you for the response. The jar was already placed in the same path as the couchbase connector jar directory.
The issue was resolved upon restarting the kafka connect cluster.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.