Replies: 1 comment 2 replies
-
Can you provide a full reproducer? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everybody.
I have a Jira plugin which uses Jackson to serialize/deserialize it's configuration.
The code itself looks like this (simplified):
The
ConditionBean
interface has a number of concrete implementations. I'm trying to add@JsonTypeInfo
to handle this, and here's it get's weird.If I do it like this, everything works fine:
The owning object is serialized as:
Then I tried to make this less wordy and tried this:
Resulting JSON is like this which seems fine:
However, when I try deserialize this when the plugin starts, I get an error:
Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'com.my.org.FirstConditionBean' as a subtype of
com.my.org.ConditionBean: no such class found
What puzzles me more is that it only happens right after start. If I execute exactly the same code later, everything works. As if something wasn't loaded at the beginning.
Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions