com.fasterxml.jackson.databind.JsonMappingException: N/A at [Source: src\main\resources\profile.xml; line: 3, column: 13] (through reference chain: com.example.data.Profile["userID"])

Stack Overflow | rob | 7 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

    How do I read a complex POJO from a flattened XML structure using Jackson?

    Stack Overflow | 7 months ago | rob
    com.fasterxml.jackson.databind.JsonMappingException: N/A at [Source: src\main\resources\profile.xml; line: 3, column: 13] (through reference chain: com.example.data.Profile["userID"])

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.example.data.Profile.setUserID()
    2. com.example.data
      Profile.setUserID
      1. com.example.data.Profile.setUserID(Profile.java:18)
      1 frame
    3. 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
    4. Jackson
      ObjectMapper.readValue
      1. com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:97)
      2. com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
      3. com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
      4. com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3807)
      5. com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2691)
      5 frames
    5. com.example
      JacksonXMLExample.main
      1. com.example.JacksonXMLExample.main(JacksonXMLExample.java:21)
      1 frame