org.apache.spark.SparkException: Task not serializable

Stack Overflow | null | 1 month ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Scalatest and Spark giving "java.io.NotSerializableException: org.scalatest.Assertions$AssertionsHelper"

    Stack Overflow | 2 months ago | Tushar Sudake
    org.apache.spark.SparkException: Task not serializable
  2. 0

    Exceptions in dumping CSV file data to Cassandra

    Stack Overflow | 3 months ago | Anji
    org.apache.spark.SparkException: Task not serializable
  3. 0

    Spark Scala Error: `Task not serializable`

    Stack Overflow | 5 months ago | Quantad
    org.apache.spark.SparkException: Task not serializable
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SparkException: Task not serializable · Mastering Apache Spark 2

    gitbooks.io | 2 months ago
    org.apache.spark.SparkException: Task not serializable
  6. 0

    Databricks Apache Spark 1.4: Task not serializable (Scala)

    Stack Overflow | 2 years ago | user3399275
    org.apache.spark.SparkException: Task not serializable

  1. rafalg 4 times, last 1 week ago
  2. Nikolay Rybak 15 times, last 2 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.NotSerializableException

    FunnelServiceComponentImpl$FunnelAccounts Serialization stack: - object not serializable (class: FunnelServiceComponentImpl$FunnelAccounts, value: FunnelServiceComponentImpl$FunnelAccounts@16b7e04a) - field (class: FunnelServiceComponentImpl$FunnelAccounts$$anonfun$1, name: $outer, type: class FunnelServiceComponentImpl$FunnelAccounts) - object (class FunnelServiceComponentImpl$FunnelAccounts$$anonfun$1, <function1>)

    at org.apache.spark.serializer.SerializationDebugger$.improveException()
  2. Spark
    RDD.map
    1. org.apache.spark.serializer.SerializationDebugger$.improveException(SerializationDebugger.scala:40)
    2. org.apache.spark.serializer.JavaSerializationStream.writeObject(JavaSerializer.scala:46)
    3. org.apache.spark.serializer.JavaSerializerInstance.serialize(JavaSerializer.scala:100)
    4. org.apache.spark.util.ClosureCleaner$.ensureSerializable(ClosureCleaner.scala:295)
    5. org.apache.spark.util.ClosureCleaner$.org$apache$spark$util$ClosureCleaner$$clean(ClosureCleaner.scala:288)
    6. org.apache.spark.util.ClosureCleaner$.clean(ClosureCleaner.scala:108)
    7. org.apache.spark.SparkContext.clean(SparkContext.scala:2039)
    8. org.apache.spark.rdd.RDD$$anonfun$map$1.apply(RDD.scala:366)
    9. org.apache.spark.rdd.RDD$$anonfun$map$1.apply(RDD.scala:365)
    10. org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
    11. org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
    12. org.apache.spark.rdd.RDD.withScope(RDD.scala:358)
    13. org.apache.spark.rdd.RDD.map(RDD.scala:365)
    13 frames
  3. Unknown
    Main$delayedInit$body.apply
    1. FunnelServiceComponentImpl$FunnelAccounts.getAccounts(FunnelServiceComponentImpl.scala:24)
    2. Main$.delayedEndpoint$Main$1(Main.scala:26)
    3. Main$delayedInit$body.apply(Main.scala:7)
    3 frames
  4. Scala
    App$class.main
    1. scala.Function0$class.apply$mcV$sp(Function0.scala:34)
    2. scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    3. scala.App$$anonfun$main$1.apply(App.scala:76)
    4. scala.App$$anonfun$main$1.apply(App.scala:76)
    5. scala.collection.immutable.List.foreach(List.scala:381)
    6. scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
    7. scala.App$class.main(App.scala:76)
    7 frames
  5. Unknown
    Main.main
    1. Main$.main(Main.scala:7)
    2. Main.main(Main.scala)
    2 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  7. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
    1 frame