Bruce Robbins created SPARK-43843: ------------------------------------- Summary: Saving an AVRO file with Scala 2.13 results in NoClassDefFoundError Key: SPARK-43843 URL: https://issues.apache.org/jira/browse/SPARK-43843 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 3.5.0 Reporter: Bruce Robbins
I launched spark-shell as so: {noformat} bin/spark-shell --driver-memory 8g --jars `find . -name "spark-avro*.jar" | grep -v test | head -1` {noformat} I got the below error trying to create an AVRO file: {noformat} scala> val df = Seq((1, 2), (3, 4)).toDF("a", "b") val df = Seq((1, 2), (3, 4)).toDF("a", "b") val df: org.apache.spark.sql.DataFrame = [a: int, b: int] scala> df.write.mode("overwrite").format("avro").save("avro_file") df.write.mode("overwrite").format("avro").save("avro_file") java.lang.NoClassDefFoundError: scala/collection/immutable/StringOps at org.apache.spark.sql.avro.AvroFileFormat.supportFieldName(AvroFileFormat.scala:160) at org.apache.spark.sql.execution.datasources.DataSourceUtils$.$anonfun$checkFieldNames$1(DataSourceUtils.scala:75) at org.apache.spark.sql.execution.datasources.DataSourceUtils$.$anonfun$checkFieldNames$1$adapted(DataSourceUtils.scala:74) at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:563) at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:561) at org.apache.spark.sql.types.StructType.foreach(StructType.scala:105) at org.apache.spark.sql.execution.datasources.DataSourceUtils$.checkFieldNames(DataSourceUtils.scala:74) at org.apache.spark.sql.execution.datasources.FileFormatWriter$.write(FileFormatWriter.scala:120) ... scala> {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org