java.lang.ClassCastException: org.joda.time.DateTime 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 GitHub by mkhsueh
, 1 year ago
org.joda.time.DateTime cannot be cast to java.lang.Long
via Stack Overflow by odhran
, 2 years ago
via Google Groups by Sukhendu Chakraborty, 7 months ago
java.lang.Byte cannot be cast to java.lang.Long
via Stack Overflow by David Franke
, 2 years ago
java.lang.String cannot be cast to java.lang.Number
via treselle.com by Unknown author, 1 year ago
java.lang.String cannot be cast to java.lang.Long
java.lang.ClassCastException: org.joda.time.DateTime cannot be cast to java.lang.Long
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:79)
at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:114)
at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:104)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:66)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:58)
at com.twitter.bijection.avro.BinaryAvroCodec.apply(AvroCodecs.scala:273)
at com.twitter.bijection.avro.BinaryAvroCodec.apply(AvroCodecs.scala:269)
at com.twitter.chill.InjectiveSerializer.write(InjectiveSerializer.scala:24)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

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