-
Notifications
You must be signed in to change notification settings - Fork 357
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
Prevent Jackson failing while loading Modules (classloader issues) #5604
Conversation
Signed-off-by: jansupol <jan.supol@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks
This would be nice to be backported in 2.x |
final List<Module> modules; | ||
try { | ||
modules = ObjectMapper.findModules(); | ||
} catch (Exception e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just I noted that ObjectMapper will throw an java.util.ServiceConfigurationError. This needs to catch Throwable.
Which version of the 3.1 line will have this fix? I've the following exception only on the first request
|
@pizzi80 You are lucky as that should be fixed in 3.1.7. It should be out by the end of this week, unless unexpected technical difficulties. |
Perfect!! I assumed it was 3.1.7, but just to confirm that this was the bug in question and the related pull request! thanks for your answer! |
@pizzi80 3.1.7 is in mvn central. |
thank you all for the response Just upgraded to 3.1.7 but the bug it's still present :| After a server startup, only the very first response that produces json If you prefer I could open a new issue! let me know
|
This is other issue. In your stacktrace you should have the class we modified: |
you should check if you have
dependency on your class path. |
Excatly, I don't have JAXB at all I'm using only Weld + Jersey + Jackson Tomcat 10.1.24
|
In this case, make sure the |
Hm, as I'm looking at how to register only
However, both |
I've investigated a bit, inspired by: FasterXML/jackson-future-ideas#11 I've resolved adding the following Not sure if it's the best solution
and I've added some exclusions to
|
yes, this line |
Thanks a lot for the support! ;) |
No description provided.