I need to use both (oddly enough ..) the "prefer-web-inf-classes" and "prefer-application-packages" weblogic.xml properties on the Weblogic 12c server (12.2.1)
This is a REST app based on Jersey 1.9. * (Jersey 1.x JAX-RS RI) and Guice.
1. Why use: prefer-web-inf-classes
If you have more than one WAR, you must place at the war / library level libraries for guice-jersey / guice, otherwise you will get a Multiuser Error .
It should also point prefer-web-inf-classes to true . This method works correctly! I tried to work in the same way using prefer-application-packages with packages (com.sun.jersey.guice.spi.container.servlet / com.google.inject.servlet etc.), but nothing.
Note. It is not possible to exclude these libraries at the EAR level.
2. Why use: prefer-application-packages
To use JAX-RS RI Jersey 1.x on Weblogic 12c (12.2.1), so I have to specify the following packages (otherwise Weblogic uses Jersey 2 and a different version of the Jackson libraries, etc.)
It works great on Jersey 1.X if it is listed this way. . I explored the two wars separately and works great ... but, remember, my friend, I have two wars ... etc.
Summary
I cannot use both properties (error deployment to use both properties in weblogic.xml ..), but it is necessary:
- To solve the problem with Guice Filter, add true-web-inf-classes to true to use guice-servlet.jar / jersey-guice.jar at the war-lib level.
- To work with Jersey 1.x, you need to use ..... prefer-application-package
Question : how to combine both to use one of them?
source share