com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of sample.immutables_javaslang_bug_20170112.Schema$Phone: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information at [Source: {"title":"Mr","dob":[2017,1,12],"phones":[{"number":"555-55555"},{"number":"42-424242"}],"name":"John"}; line: 1, column: 43] (through reference chain: sample.immutables_javaslang_bug_20170112.PersonImpl$Json["phones"])

GitHub | io7m | 4 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    GitHub comment 101#272143963

    GitHub | 4 months ago | io7m
    com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of sample.immutables_javaslang_bug_20170112.Schema$Phone: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information at [Source: {"title":"Mr","dob":[2017,1,12],"phones":[{"number":"555-55555"},{"number":"42-424242"}],"name":"John"}; line: 1, column: 43] (through reference chain: sample.immutables_javaslang_bug_20170112.PersonImpl$Json["phones"])
  2. 0

    Deserialization into List subtype with JsonCreator no longer works

    GitHub | 2 years ago | adamjoeldavis
    com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of data.DataObject, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information at [Source: [{"deleted":false,"data":{}}]; line: 1, column: 2] (through reference chain: java.util.ArrayList[0])
  3. 0

    How can I use Jackson mapper for java.io.Serializable type fields?

    Stack Overflow | 3 years ago | Niranjan
    com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of java.io.Serializable, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information at [Source: java.io.StringReader@6fd90825; line: 1, column: 2] (through reference chain: com.demo.jackson.AClass["id"])
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to serialize interface fields using Jackson's objectMapper?

    Stack Overflow | 4 years ago | Naman
    com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of MetricValueDescriptor, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information at [Source: java.io.ByteArrayInputStream@2ede2c9f; line: 1, column: 2] (through reference chain: SingleValueMetricImpl["descriptor"])
  6. 0

    How to use both JsonTypeInfo and de/serializers for custom handling of polymorphic subtypes?

    Stack Overflow | 2 years ago | CMerrill
    com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of MyInterface, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information at [Source: java.io.ByteArrayInputStream@37883b97; line: 1, column: 45] (through reference chain: Container["items"]->Object[][0])

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.fasterxml.jackson.databind.JsonMappingException

      Can not construct instance of sample.immutables_javaslang_bug_20170112.Schema$Phone: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information at [Source: {"title":"Mr","dob":[2017,1,12],"phones":[{"number":"555-55555"},{"number":"42-424242"}],"name":"John"}; line: 1, column: 43] (through reference chain: sample.immutables_javaslang_bug_20170112.PersonImpl$Json["phones"])

      at com.fasterxml.jackson.databind.JsonMappingException.from()
    2. Jackson
      AbstractDeserializer.deserialize
      1. com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
      2. com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:1456)
      3. com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1012)
      4. com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserialize(AbstractDeserializer.java:149)
      4 frames
    3. javaslang.jackson.datatype
      ArrayDeserializer.deserialize
      1. javaslang.jackson.datatype.deserialize.ArrayDeserializer.deserialize(ArrayDeserializer.java:57)
      1 frame
    4. Jackson
      ObjectMapper.readValue
      1. com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:499)
      2. com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:101)
      3. com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:276)
      4. com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:178)
      5. com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:150)
      6. com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1194)
      7. com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:314)
      8. com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:148)
      9. com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3798)
      10. com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2842)
      10 frames
    5. sample.immutables_javaslang_bug_20170112
      SampleTest.json_test
      1. sample.immutables_javaslang_bug_20170112.SampleTest.json_test(SampleTest.java:45)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    7. JUnit
      JUnitCore.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      5. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      14. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      14 frames
    8. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
      2. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
      2 frames
    9. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
      2 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    11. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
      1 frame