Updating from Jackson 2.17 to 2.18 causes KotlinReflectionInternalError #879
Unanswered
GFriedrich
asked this question in
Q&A
Replies: 1 comment
-
Could possibly add "ignored type" configuration to prevent any otherwise detected properties with specified value. This can be done via annotation
which might work if you can target specific type. Alternatively if you can annotate Constructor in question with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
I've recently tried to update from Jackson 2.17 to 2.18 and found some issue. The reason I've added this as a Q&A and not as a bug is that I think that Jackson is doing things right (actually more correct than before because of the rewrite for the POJO deserialization), but this now causes issues for me and I need to figure what I have to change.
So after the upgrade I get this stacktrace:
The actual class that tries to get a deserializer here uses a property in the constructor which is a "Function1" (aka
(xyz) -> abc
in Kotlin). The fun fact is that the deserializer will never be used because the property is not part of the serialized data so the lookup of this information will never be used.Now I'm wondering what to do here. I tracked the problematic line down to the
BeanDeserializerFactory
which now callsbeanDesc.getPotentialCreators()
and it didn't in the old version.This in turn causes some introspection of those "member properties" as seen in the stacktrace, which causes this error.
I'm wondering: Would be the right way to go to place some
@JsonIgnore
annotations to the properties that are not part of actual serialized data to avoid this kind of introspection done by Jackson?Thanks in advance for any help.
Beta Was this translation helpful? Give feedback.
All reactions