java.lang.ClassCastException: test.spark.SampleTest$A cannot be cast to java.lang.Long

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by jigsaw
, 1 year ago
test.spark.SampleTest$A cannot be cast to java.lang.Long
via GitHub by kscaldef
, 2 months ago
java.lang.Integer cannot be cast to java.lang.Long
via Stack Overflow by Patrick
, 3 months ago
java.lang.Double cannot be cast to java.lang.Long
via scala-lang.org by Unknown author, 2 years ago
java.lang.Integer cannot be cast to java.lang.Long
via Google Groups by softprops, 2 years ago
java.lang.Integer cannot be cast to java.lang.Long
java.lang.ClassCastException: test.spark.SampleTest$A cannot be cast to java.lang.Long
at scala.runtime.BoxesRunTime.unboxToLong(BoxesRunTime.java:110)
at org.apache.spark.sql.catalyst.expressions.BaseGenericInternalRow$class.getLong(rows.scala:42)
at org.apache.spark.sql.catalyst.expressions.GenericInternalRow.getLong(rows.scala:221)

Users with the same issue

6 times, 1 year ago
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
4 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.