[
https://issues.apache.org/jira/browse/FLINK-16969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17336244#comment-17336244
]
Flink Jira Bot commented on FLINK-16969:
----------------------------------------
This issue was labeled "stale-major" 7 ago and has not received any updates so
it is being deprioritized. If this ticket is actually Major, please raise the
priority and ask a committer to assign you the issue or revive the public
discussion.
> Unable to use case class in flink scala shell
> ---------------------------------------------
>
> Key: FLINK-16969
> URL: https://issues.apache.org/jira/browse/FLINK-16969
> Project: Flink
> Issue Type: Bug
> Components: Scala Shell
> Affects Versions: 1.10.0
> Reporter: Jeff Zhang
> Priority: Major
> Labels: stale-major
>
> {code:java}
> case class WC(word: String, count: Int)
> val wordCounts = benv.fromElements(WC("hello", 1),WC("world", 2), WC("world",
> 8))
> wordCounts.collect(){code}
> Get the following exception
> {code}
> 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
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)