Skip to content
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: Could not initialize class io.circe.Decoder$ after Shading #465

Open
clintoncheang opened this issue Apr 21, 2022 · 3 comments

Comments

@clintoncheang
Copy link

Hi all, I tried to shade shapeless when I did a spark-submit using sbt-assembly. In my Spark Assembly scala file, I added assembly / assemblyShadeRules := Seq(ShadeRule.rename("shapeless.**" -> "new_shapeless.@1").inAll). But when I submit it to Spark 3.1.2, I got this error above. I am wondering am I adding the Shading correctly?

@dmykhailov
Copy link

Same here. Have you found any solution so far?

@joan38
Copy link

joan38 commented Aug 18, 2022

Same here when I try to upgrade to Spark 3.x. Works fine on Spark 2.4.4

@mattharder91
Copy link

Possibly related to this issue:

typelevel/cats#3628

my issue was that circe had a different version of cats than spark 3

shading should help:

assembly / assemblyShadeRules := Seq( ShadeRule.rename("shapeless.**" -> "new_shapeless.@1").inAll, ShadeRule.rename("cats.kernel.**" -> s"new_cats.kernel.@1").inAll ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants