-
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
ClassCastException when using XmlAdapter with XmlEnum #256
Comments
First of all, thank you for reporting the issue. Figuring out where to add tests is tricky: JAXB annotations module cannot depend on XML module (so can't be added here). But looks like However, the "correct" place would be here: https://github.com/FasterXML/jackson-integration-tests/ where it is legal to have dependencies to any and all Jackson modules. |
Is there anything I could/should do? |
@wbiller No, I think this is all the information. I am pretty overloaded currently so it may take a while until I get to look into this, unfortunately. One minor thing could be if you could try to find minimal reproduction (I suspect most JAXB annotations used are not required here). But reproduction is the most important thing and you got it :) |
Just realized that XML is probably not the problem here: can create JSON reproduction as well. But looking at what is happening, I am not sure how code is supposed to work. Does this work with JAXB? (I assume so). If this is expected to work there's bit of impedance between how Jackson |
I wanted to serialize a fairly complex object structure and came across this ClassCastException.
It looks like the XML Adapter is called too early when the type is an enum.
Below snippet demonstrates the error as a JUnit test
The test was executed with jackson-module-jaxb-annotations-2.17.2.jar
The text was updated successfully, but these errors were encountered: