schema-registry icon indicating copy to clipboard operation
schema-registry copied to clipboard

Class io.confluent.connect.avro.AvroConverter could not be found

Open renukaradhya opened this issue 8 years ago • 5 comments

I am trying to run connect-standalone.bat on windows and getting below error

command: confluent-3.0.1\bin\windows>connect-standalone.bat ../../etc/schema-registry/connect-avro-standalone.properties ../../etc/kafka-connect-elasticsearch/quickstart-elasticsearch.properties

Exception in thread "main" org.apache.kafka.common.config.ConfigException: Invalid value io.confluent.connect.avro.AvroConverter for configuration value.converter: Class io.confluent.connect.avro.AvroConverter could not be found. at org.apache.kafka.common.config.ConfigDef.parseType(ConfigDef.java:672) at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:418) at org.apache.kafka.common.config.AbstractConfig.(AbstractConfig.java:55) at org.apache.kafka.common.config.AbstractConfig.(AbstractConfig.java:62) at org.apache.kafka.connect.runtime.WorkerConfig.(WorkerConfig.java:156) at org.apache.kafka.connect.runtime.standalone.StandaloneConfig.(StandaloneConfig.java:43) at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:70)

I build new kafka-connect-avro-converter-3.1.0.jar from \schema-registry-master\avro-converter GIT hub code.

I have placed the kafka-connect-avro-converter-3.1.0.jar in confluent-3.0.1\share\java\schema-registry folder before running the connect-standalone.bat

I even tried creating an instance of AvroConverter in separate project but getting below error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/kafka/connect/storage/Converter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at com.targeting.util.MyConverter.main(MyConverter.java:9) Caused by: java.lang.ClassNotFoundException: org.apache.kafka.connect.storage.Converter at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 13 more

renukaradhya avatar Sep 25 '16 09:09 renukaradhya

@renukaradhya Just a FYI. We are not currently testing the Confluent platform on windows. The class not found is in core Kafka. In general the server processes for Kafka are only tested on Linux.

jcustenborder avatar Oct 12 '16 21:10 jcustenborder

Hi,

I am using Confluent Platform on windows and fixed some of the issues and checked in to GITHUB. Its available in the below link.

https://github.com/renukaradhya/confluentplatform

Basically updated few batch files.

Regards, Aradhya

On Thu, Oct 13, 2016 at 2:45 AM, Jeremy Custenborder < [email protected]> wrote:

@renukaradhya https://github.com/renukaradhya Just a FYI. We are not currently testing the Confluent platform on windows. The class not found is in core Kafka. In general the server processes for Kafka are only tested on Linux.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/confluentinc/schema-registry/issues/420#issuecomment-253341638, or mute the thread https://github.com/notifications/unsubscribe-auth/AVVblKjaiHK6Nq3D9IeM6hw2Sq8WSecFks5qzU4AgaJpZM4KF3TY .

renukaradhya avatar Oct 13 '16 14:10 renukaradhya

NoClassDefFoundError: org/apache/kafka/connect/storage/Converter

This is a built-in class with Kafka, and would indicate your classpath for the connect-standalone script was incorrect.

If you still have problems with it, report the problem to Apache Kafka JIRA.

Class io.confluent.connect.avro.AvroConverter could not be found

Nowadays, you should install the Converter from Confluent Hub

https://www.confluent.io/hub/confluentinc/kafka-connect-avro-converter

OneCricketeer avatar Feb 08 '22 23:02 OneCricketeer