Java NoClassDefFoundError when running confluent-hub

Hi there, Im having problems when trying to follow this tutorial, Im using Ubuntu 22.04 (windows subsystem linux). Please help

This looks like a classpath issue. Try these couple of things to debug:

First, add this line before the exec java ... line of the confluent-hub script:

echo "Classpath: ${HUB_CLI_CLASSPATH}"

And then run confluent-hub. It should output:

Classpath: :<confluent-hub install dir>/share/java/confluent-hub-client/*

Do you get this output?

If you do see the expected output, go into that classpath directory and run jar tvf airline-2.6.0.jar | grep "com/github/rvesse/airline/Cli". That jar should be there and the command should return com/github/rvesse/airline/Cli.class in its output. Does it?

Hi dtroiano, thank you for the quick response!

I’ve got “Classpath: :/mnt/c/confluent-7.5.2/share/java/confluent-hub-client/*” when running confluent-hub. Here’s the output for the last command:

Looks like the JAR is corrupted, or perhaps empty? Try reinstalling the client:

wget https://client.hub.confluent.io/confluent-hub-client-latest.tar.gz
tar xzvf confluent-hub-client-latest.tar.gz

This should show the file to be 348K:

ls -lh share/java/confluent-hub-client/airline-2.6.0.jar

And this should list classes without hitting a ZipException:

jar tvf share/java/confluent-hub-client/airline-2.6.0.jar

Do you get through those steps without hitting any issues?

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