Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialization of Exception serialized as XML fails #250

Closed
cowtowncoder opened this issue Jul 12, 2017 · 1 comment
Closed

Deserialization of Exception serialized as XML fails #250

cowtowncoder opened this issue Jul 12, 2017 · 1 comment
Milestone

Comments

@cowtowncoder
Copy link
Member

(note: moved from FasterXML/jackson-databind#1695)

Attempts to deserialize XML serialization of Exceptions fails with:

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)
@cowtowncoder
Copy link
Member Author

Note: actual fix is in jackson-databind (to allow "stringified" number). Also fixed in 2.8 branch, for 2.8.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant