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

Version 6.4.0 failing for Spark 3.5.0 #357

Open
ravillahari opened this issue Mar 29, 2024 · 2 comments
Open

Version 6.4.0 failing for Spark 3.5.0 #357

ravillahari opened this issue Mar 29, 2024 · 2 comments

Comments

@ravillahari
Copy link

Abris Version: 6.4.0
Spark Version: 3.5.0
Databricks Runtime: 14.3

Failing with error:
Cause: java.lang.NoClassDefFoundError: org/apache/spark/sql/internal/SQLConf$LegacyBehaviorPolicy$
at org.apache.spark.sql.avro.AvroDeserializer.(AvroDeserializer.scala:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.spark.sql.avro.AbrisAvroDeserializer$$anonfun$1.applyOrElse(AbrisAvroDeserializer.scala:39)
at org.apache.spark.sql.avro.AbrisAvroDeserializer$$anonfun$1.applyOrElse(AbrisAvroDeserializer.scala:37)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:38)
at scala.util.Failure.recover(Try.scala:234)
at org.apache.spark.sql.avro.AbrisAvroDeserializer.(AbrisAvroDeserializer.scala:37)

In Spark 3.4.0 "LegacyBehaviorPolicy" is available in same file as here:
https://github.com/apache/spark/blob/branch-3.4/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala

However in Spark 3.5.0 "LegacyBehaviorPolicy" is available and used in package:
https://github.com/apache/spark/blob/branch-3.5/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
But is available new package:
https://github.com/apache/spark/blob/branch-3.5/sql/api/src/main/scala/org/apache/spark/sql/internal/LegacyBehaviorPolicy.scala

Could this be issue for the above error?

@cerveada
Copy link
Collaborator

cerveada commented Apr 8, 2024

Yes, it used to be inside SQLConf object, now it is a top level class, so the full class name is different.

@SlevinBE
Copy link

A workaround for this issue is available in #355
However, Abris should probably provide the right version of the spark-avro dependency.

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

No branches or pull requests

3 participants