I have to use both (oddly enough ..) prefer-web-inf-classes and prefer-application-packages properties of weblogic.xml on a Weblogic
After all
prefer-web-inf-classes to true.If you use this, you don't need to use prefer-application-packages ....BUT ENSURE that you have the correct libraries at war /ear level.
The problem was:
The Project had a dependency with Jersey 2 (based on Swagger for Jersey 2.X ...) So via Swagger dependencies (swagger-jersey2-jaxrs), Jersey 2 libraries was packaged on ear/war... and so prefer-web-inf-classes HAS NO EFFECT!
After removing the dependency all was resolved!
At same the level (classpath or ear lib, or war lib) should not exist different versions of the same library.