Apicurio registry error for Postgres connector

388 views
Skip to first unread message

Kamal Chavda

unread,
Sep 20, 2021, 6:10:14 PM9/20/21
to debezium
Hi All,
I am getting the error below when trying to POST my source connector. I am using the unwrap-smt example and trying to set-up process from Postgres to Kafka to Redshift. Following this article by Jiri Pechanec. The connector works if I remove references to apicurio. 

{"error_code":400,"message":"Connector configuration is invalid and contains the following 2 error(s):\nInvalid value io.apicurio.registry.utils.converter.ExtJsonConverter for configuration key.converter: Class io.apicurio.registry.utils.converter.ExtJsonConverter could not be found.\nInvalid value io.apicurio.registry.utils.converter.ExtJsonConverter for configuration value.converter: Class io.apicurio.registry.utils.converter.ExtJsonConverter could not be found.\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"}%

I haven't been able to find any useful information on this error. It matches the example here: https://github.com/debezium/debezium-examples/blob/master/tutorial/register-mysql-apicurio-converter-json.json. Only difference is that I'm doing it for Postgres.

Below is my config that works:

curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d ' 
  "name": "inventory-connector",  
  "config": {  
  "connector.class": "io.debezium.connector.postgresql.PostgresConnector",  
  "tasks.max": "1",  
  "database.hostname": "postgres",  
  "database.port": "5432",  
  "database.user": "postgresuser",  
  "database.password": "postgrespw",  
  "database.dbname" : "inventory",  
  "database.server.name": "dbserver1",  
  "schema.include": "inventory",  
  "heartbeat.interval.ms":"30000",
  "time.precision.mode":"connect",  
  "transforms": "route",
  "transforms.route.type": "org.apache.kafka.connect.transforms.RegexRouter",
  "transforms.route.regex": "([^.]+)\\.([^.]+)\\.([^.]+)",
  "transforms.route.replacement": "$3"
  }  
}  

This does not work

curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d ' 
  "name": "inventory-connector",  
  "config": {  
  "connector.class": "io.debezium.connector.postgresql.PostgresConnector",  
  "tasks.max": "1",  
  "database.hostname": "postgres",  
  "database.port": "5432",  
  "database.user": "postgresuser",  
  "database.password": "postgrespw",  
  "database.dbname" : "inventory",  
  "database.server.name": "dbserver1",  
  "schema.include": "inventory",  
  "heartbeat.interval.ms":"30000",
  "time.precision.mode":"connect", 
  "key.converter":"io.apicurio.registry.utils.converter.ExtJsonConverter",
  "key.converter.apicurio.registry.url":"http://localhost:8080/apis/registry/v2", 
  "key.converter.apicurio.registry.auto-register":"true",
  "key.converter.apicurio.registry.find-latest":"true",     
  "value.converter":"io.apicurio.registry.utils.converter.ExtJsonConverter",
  "value.converter.apicurio.registry.url": "http://localhost:8080/apis/registry/v2",
  "value.converter.apicurio.registry.auto-register":"true",
  "value.converter.apicurio.registry.find-latest":"true",  
  "transforms": "route",
  "transforms.route.type": "org.apache.kafka.connect.transforms.RegexRouter",
  "transforms.route.regex": "([^.]+)\\.([^.]+)\\.([^.]+)",
  "transforms.route.replacement": "$3"
  }  
}  
'
Any help would be greatly appreciated!

Long Văn

unread,
May 18, 2023, 8:10:28 AM5/18/23
to debezium
I got the same issue, and fixed it!
because one of my workers missing ApicurioRegistry library.
Just add a lacking library and restart the service.

Chris Cranford

unread,
May 19, 2023, 8:57:00 AM5/19/23
to debe...@googlegroups.com
Hi,

This is indeed great advice and precisely what I would have suggested as well.  Typically when classes cannot be found, this means that there is either a typo in the class name or the jar file that supplies that implementation isn't on the plugin path for Kafka Connect.  If the class name is correct, I suggest checking the latter to make sure the jar is available.

--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/e9946480-5d52-4bf6-b257-4cf30c6e458dn%40googlegroups.com.
Message has been deleted

Chris Cranford

unread,
May 24, 2023, 8:06:19 AM5/24/23
to debe...@googlegroups.com
Hi, it appears this has been merged.

On 5/22/23 00:10, Long Văn wrote:
hi @Chirs, could you review my issue ? :( https://issues.redhat.com/browse/DBZ-6492
Reply all
Reply to author
Forward
0 new messages