-
Notifications
You must be signed in to change notification settings - Fork 77
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
Afterburner breaks serialization of ObjectMapper #97
Comments
Thank you for reporting this: yes, modules should be serializable (there is one known exception for 2.x, Java 8 date/time module; but those are exceptions to the rule and Afterburner not known as one). One quick question: do you know if this is a regression (used to work), or just observed now? |
Ok. So, was able to make serializability work in 2.11(.1) as long as Jackson 3.0 will actually change the limit as JDK serialization of |
I've never tried it in previous versions. I've worked around it for now by just using a static variable. I was trying to have Spring create and configure the JsonMapper, which would then be used in a map function for Spark, but those must be serializable. |
@zman0900 Makes sense. Serializing As per my notes this will be fixed in 2.11.1, as long as pattern of config-only-before-serialization/deserialization is followed. |
JsonMapper and its parent class ObjectMapper are both supposed to be Serializable, but when AfterburnerModule is added, serialization is no longer possible.
For example, this code:
Results in exception:
Without adding the AfterburnerModule to JsonMapper, this works as expected.
Jackson version = 2.11.0
The text was updated successfully, but these errors were encountered: