You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deserialize of Exception has failed.
Reproduce code is:
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
public class Test {
public static void main(String[] args) throws Exception {
Exception e = new Exception();
XmlMapper mapper = new XmlMapper();
String s = mapper.writeValueAsString(e);
System.out.println(s);
Exception e2 = mapper.readValue(s, Exception.class);
String s2 = mapper.writeValueAsString(e2);
System.out.println(s2);
}
}
Error reports:
Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: Non-numeric token (VALUE_STRING) for property 'lineNumber'
at [Source: java.io.StringReader@38bc8ab5; line: 1, column: 116] (through reference chain: java.lang.Object[][0])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
at com.fasterxml.jackson.databind.DeserializationContext.reportMappingException(DeserializationContext.java:1234)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1122)
at com.fasterxml.jackson.databind.deser.std.StackTraceElementDeserializer.deserialize(StackTraceElementDeserializer.java:40)
at com.fasterxml.jackson.databind.deser.std.StackTraceElementDeserializer.deserialize(StackTraceElementDeserializer.java:11)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:196)
at com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:20)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:504)
at com.fasterxml.jackson.databind.deser.std.ThrowableDeserializer.deserializeFromObject(ThrowableDeserializer.java:103)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:148)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3814)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2858)
at jp.mahara.tumblr.Test.main(Test.java:14)
Deserialize of Exception has failed.
Reproduce code is:
Error reports:
Maven dependency is:
The text was updated successfully, but these errors were encountered: