audienceproject / spark-dynamodb

Plug-and-play implementation of an Apache Spark custom data source for AWS DynamoDB.
Apache License 2.0
175 stars 90 forks source link

NoClassDefFoundError on Java8 JFunction #102

Open textboy opened 3 years ago

textboy commented 3 years ago

Error: java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: scala/runtime/java8/JFunction0$mcI$sp Runtime: Databricks workspace 5.5 LTS (i.e. Spark 2.4.3 + Scala 2.11) Code: import com.audienceproject.spark.dynamodb.implicits._ import org.apache.spark.internal.Logging import org.apache.spark.sql.SparkSession

object DynamoClient extends Logging { def test01() = { val region = "us-west-2" val tableName = "test_table" val spark = SparkSession.builder().getOrCreate() val dynamoDf = spark.read.option("region", region).dynamodb(tableName) dynamoDf.show(1) } }