Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
1.10.0
-
None
Description
case class WC(word: String, count: Int) val wordCounts = benv.fromElements(WC("hello", 1),WC("world", 2), WC("world", 8)) wordCounts.collect()
Get the following exception
java.lang.IllegalArgumentException: requirement failed: The class WC is an instance class, meaning it is not a member of a toplevel object, or of an object contained in a toplevel object, therefore it requires an outer instance to be instantiated, but we don't have a reference to the outer instance. Please consider changing the outer class to an object. at scala.Predef$.require(Predef.scala:224) at org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer$.lookupConstructor(ScalaCaseClassSerializer.scala:90) at org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer.<init>(ScalaCaseClassSerializer.scala:46) ... 66 elided
Attachments
Issue Links
- duplicates
-
FLINK-23388 Non-static Scala case classes cannot be serialised
- Open