Import_vcf() on databricks results in NoClassDefFoundError


I am just getting started with hail. I set up the libraries and cluster configuration as mentioned in the tutorial.

When I run: vds = hc.import_vcf(vcf_path), I get the following error:

java.lang.NoClassDefFoundError: Could not initialize class is.hail.driver.ToplevelCommands$
Py4JJavaError: An error occurred while calling z:is.hail.driver.ToplevelCommands.lookup.
: java.lang.NoClassDefFoundError: Could not initialize class is.hail.driver.ToplevelCommands$
at is.hail.driver.ToplevelCommands.lookup(Command.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at py4j.reflection.MethodInvoker.invoke(
at py4j.reflection.ReflectionEngine.invoke(
at py4j.Gateway.invoke(
at py4j.commands.AbstractCommand.invokeMethod(
at py4j.commands.CallCommand.execute(

Is it a mistake with my configuration? Please help.

Hi Shiva,
This isn’t your fault – you followed the directions perfectly! There’s an issue with Databricks library config which can be resolved by following the contents of this post:

Also, you should know that the Databricks tutorial uses an older version of Hail, so not everything you find in the documentation will work in that build. We’ll go back and update the Databricks deployment soon.

1 Like

Thank you, Tim. I will try installing it on my machine.