Weblogic 12c : Prefer-web-inf-classes and prefer-application-packages for Jersey

不打扰是莪最后的温柔 提交于 2019-12-01 17:52:15

After all

  1. Use just prefer-web-inf-classes to true.
  2. 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 resolved.!

At same level ( classpath or ear lib, or war lib) should not exist different versions of the same library

  • Hello, world! Hi, There are two way to resolve this problem.

    1. You can used to combine both file in to one file and call it based on choose tag as requirements.

    2. You can just write tags to merge or import/ include your xml file in to one. Example shown. Hint: Do google how to merge and call xml file based on condition.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!