-
Notifications
You must be signed in to change notification settings - Fork 117
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
Fail to serialize TemporalAdjuster
type with 2.12
#207
Comments
Looking at How did this get handled before? Is your use case serialization-only? |
@cowtowncoder yes its serialized as object in <= 2.11
I believe it's related to/side effect of the ticket I shared & fix applied, however, exception is wrong since I already enabled |
@cowtowncoder for my use-case, actually I just ignored that field, since it's not supposed to serialized anyway, but got when running tests & wanted to report since I couldn't find anything, other than the ticket I shared, mentioning this change. |
@gokhanoner Yes, this is a tricky one since the change itself is in The underlying challenge is also the open-ended set of types under Java 8 date/time module: it is likely there are others that could exhibit similar problem. The problem databind change solves is a very common FAQ style problem for users -- without blocking these types, and in absence of module, all types are serialized POJO-style, and none of them can be read back. Users are then confused because behavior is very different between module registered and not; as such, it seemed better to try to detect this case. Handling is heuristic, of course, since databind has no knowledge of what this module might do, when it is not actually registered... But now that I said that, I wonder if handling wrt databind/2683 could try to determine if module actually is registered, and avoid throwing exception. Theoretically |
I think I have an idea how to work around the issue here. Maybe the failing check should only apply to direct descendants of |
TemporalAdjuster
type with 2.12
@cowtowncoder is there a PR in databind module already? |
@gokhanoner yes. there is a commit for 2.12 branch. I also pushed 2.12.3-SNAPSHOT build to Sonatype OSS repo. |
### What changes were proposed in this pull request? This pr upgrade Jackson version to 2.12.3. Jackson Release 2.12.3: [https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.12.3](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.12.3) ### Why are the changes needed? Upgrade to a new version to bring potential bug fixes like [https://github.com/FasterXML/jackson-modules-java8/issues/207](https://github.com/FasterXML/jackson-modules-java8/issues/207) and avro's master has been upgraded to Jackson to 2.12.3 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass the Jenkins or GitHub Action Closes #32688 from LuciferYang/SPARK-35550. Authored-by: yangjie01 <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
Starting with 2.12, below code fails & throw exception. I wonder if it's related to FasterXML/jackson-databind#2683
Tested with 2.11.4 & 2.10.5, both serialize successfully.
Note: Adding deprecated jsr310 module also doesn't work.
The text was updated successfully, but these errors were encountered: