Issue with Could not initialize class $linec4a1686037264c21b0e58b369fab8f2d59.$read$

williamwjs
New Contributor II

Our job is written in Scala on DataBricks. It used to have the same problem, but was managed to work with putting all case classes in a separate cell. However, lately it started to fail again due to the same error:

Could not initialize class $linec4a1686037264c21b0e58b369fab8f2d59.$read$
Caused by: NoClassDefFoundError: Could not initialize class $linec4a1686037264c21b0e58b369fab8f2d59.$read$

May I ask if you could help suggest a solution to this?
Thank you!

williamwjs
New Contributor II

Hi @Retired_mod  , these do not help for my case.

Since the class that is not found is the `case class` I created in code, so it is not an issue with the dependencies. And adding `extends Serializable` does not help either.

Could you help suggest again?
Thank you!

williamwjs
New Contributor II

Hi @Retired_mod , may I ask if there's any updates to this issue? Thank you!