serialization of scala.collection.immutable.ListMap fails in 2.9.x
See original GitHub issueThis might be related to #2080, not 100% sure. I’m trying to upgrade from 2.8.3 to 2.9.6, and I’m getting a new exception in some of our tests,
Failed to specialize base type
scala.collection.immutable.ListMap<com.twitter....LengthBucket,java.lang.Object> as
scala.collection.immutable.ListMap$Node, problem: Type parameter #1/2 differs;
can not specialize com.twitter...LengthBucket with java.lang.Object
I think there’s a bug in the way that the ListMap serializer is implemented in jackson-module-scala, but it used to work, and #2080 pointed out that TypeHandlers shouldn’t need to know about these details, so I hope this can be fixed in jackson-databind. In the mean time, any idea how we can work around this issue?
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Scala Standard Library 2.12.9 - scala.collection.immutable.Nil
object Nil extends List[Nothing] with Product with Serializable. The empty list. Annotations: @SerialVersionUID(); Source: List.scala; Since.
Read more >Map can not be serializable in scala? - Stack Overflow
It's well known scala bug: ... mapValues(_.size) val b= a.map(x => x._2) res = res ::: List(cur) ... mapPartitions(myfunc).collect }.
Read more >Why can I serialize scala.collection.immutable.List ?
<console>:8: error: Cannot prove that List[_] <:< java.io.Serializable. ... I'm wondering why the base type wasn't declared Serializable, but ...
Read more >scala.collection.immutable.Range - javadoc.io
sealed class Range extends AbstractSeq[Int] with IndexedSeq[Int] with Serializable. The Range class represents integer values in range [start;end) with ...
Read more >How to sort a Scala Map by key or value (sortBy, sortWith)
ListMap import scala.collection.immutable. ... scala> ListMap(x) <console>:16: error: type mismatch; found : Seq[(String, Int)] required: (? ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For what it’s worth, the MapperFeature.USE_STATIC_TYPING workaround works for this too.
@cowtowncoder thank you! I opened a new issue #2422.