In my Spring-Boot project I use this dependency:
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.0.0</version>
</dependency>
This dependency uses internally the dependency json-smart 2.3. When I try to deploy my project in Weblogic 12C I get following error:
java.lang.NoSuchFieldError: defaultReader
at com.jayway.jsonpath.spi.json.JsonSmartJsonProvider.<init> (JsonSmartJsonProvider.java:39)
at com.jayway.jsonpath.internal.DefaultsImpl.jsonProvider(DefaultsImpl.java:21)
at com.jayway.jsonpath.Configuration.defaultConfiguration(Configuration.java:174)
at com.jayway.jsonpath.internal.JsonContext.<init>(JsonContext.java:52)
at com.jayway.jsonpath.JsonPath.parse(JsonPath.java:596)
I have already tried the solutions proposed in:
JSON Parser -java.lang.NoSuchFieldError: defaultReader
Specifically, I have tried to add in my weblogic.xml file the net.minidev.json.* dependency preference and to give priority to my war classes with: prefer-web-inf-classes with no success. My Weblogic server has an old version of smart-json (version 1.3) and it always gains preference when deploying my project. I cannot update the servers smart-json jar dependency since I don't have permissions to perform the change. I have also tried to use Weblogic's external dependency folder with no luck (How to prefer JARs from Weblogic domain over those from weblogic system).
Is there any way to make com.jayway.jsonpath dependency work with Weblogic?
Thank you.