-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoClassDefFoundError on Databricks #595
Comments
Hello! I think That's due to the codec in the RFRasterSource companion object; which implementation lives here: https://github.com/locationtech/rasterframes/blob/develop/core/src/main/scala/org/locationtech/rasterframes/encoders/StandardEncoders.scala#L87 I would assume that's due to the frameless dependency on shapeless. Unfortunately at this point the sbt assembly should be properly built and shaded to avoid shapeless / frameless deps issues. That's a good question when DB plans to upgrate their environment to depend on the more up to date lib versions. |
@pomadchin Thanks for the response. |
I think more into the way rasterframes is loaded; I feel like there can be an issue with how RF jar is built / used within the cluster. Could you trigger somehow a more precise error i.e. by calling https://github.com/locationtech/rasterframes/blob/develop/core/src/main/scala/org/locationtech/rasterframes/encoders/StandardEncoders.scala#L87 explicitly from the SBT shell? I kinda had a feeling that everything that needs to be shaded is shaded 🤔 rasterframes/project/RFAssemblyPlugin.scala Lines 51 to 66 in cc02644
|
I used pyrasterframes v0.10.1 with Databricks 9.1 LTS ML (includes Apache Spark 3.1.2, Scala 2.12).
I get the following error and cannot access the dataframe.
Code
Prerequisite
Basically, I used this explanation as a guide.
https://www.databricks.com/notebooks/rasterframes-notebook.html
Databricks can only use Spark 3 or higher. Therefore, the latest rasterframes release, v0.10.1, was used.
sbt publishLocal
to obtain pyrasterframes .jar and .whl.a. pyrasterframes-assembly-0.10.1.jar
b. pyrasterframes-0.10.1-py3-none-any.whl
Register these two files in the cluster library.
Execution conditions
Confirmed on Spark Notebook.
!gdalinfo --version GDAL 3.3.2, released 2021/09/01
I would like to use pyrasterframes on Databricks, so please investigate.
The text was updated successfully, but these errors were encountered: