-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Could not initialize class org.opensearch.common.xcontent.json.JsonXContent after updating from 2.11.1 to 2.12.0 #12950
Comments
Do you have
|
Thanks for your help looking into this. I see the class in my classpath and in IntelliJ I can see it in the external library browser for my project. It is strange, if I downgrade to older versions of OpenSearch like 2.10.0 or 2.11.0 it works as expected. But 2.12.0 or the new 2.13.0 do not seem to be working for me. I will look into it a little more to see if something is wrong in my project structure as well. |
Hi! I can't believe I opened this a month ago, time flies. However, we can close this ticket now. I found a solution. I needed to update the Liquibase dependency in my POM from 4.26.0 to 4.27.0. I am not sure why this fixed the issue but that was the only change needed to get it working again. Closing with this comment so others with similar issues may see it. |
I had the same issue with Springboot 2.2.X. Issue is in fact linked to the version of jackson. openseach above 2.12 has a minimal requirement of jackson 2.16. Springboot 2.2 ships with 2.14. I suspect the static initialisation in JsonXContent class fails silently due to a missing configuration parameter in older jackson versions. I did not investigate further to see which parameter is missing. Hope this note helps anyone else facing the issue :) |
Describe the bug
After updating from OpenSearch version 2.11.1 to 2.12.0 my code now produces the following error:
java.lang.NoClassDefFoundError: Could not initialize class org.opensearch.common.xcontent.json.JsonXContent
This is in a Java Springboot app. I am using Maven for package management and updated no other dependencies besides this one.
I did not see any required dependency changes or deprecations in the release notes for this version.
Related component
Other
To Reproduce
The following is a simplified version of the code I am using. Additional parameters are set on the searchRequest and searchSource.
Within the RestHighLevelClient search method the error is thrown
Expected behavior
The code should execute without throwing an error, as it does with 2.11.1.
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: