Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with deployment of REST Webservice after migration to 12.2.1.4.0

Hi all,
after migration from JDev 12.2.1.0.0 to 12.2.1.4.0 my application (ADF Model+ViewController and a REST Webservice) builds fine but throws exceptions on deployment.
It seams to be a Problem related to the WebLogic Server 12.2.1.4.0, because both EAR-files build in JDev 12.2.1.0.0 and 12.2.1.4.0 respectively do run fine on WebLogic Server 12.2.1.0.0. But these exact two EAR-files give the following error on WebLogic Server 12.2.1.4.0:
[12:12:15 PM] weblogic.application.WrappedDeploymentException: javax.ws.rs.container.ContainerRequestFilter
[12:12:15 PM] Deployment cancelled.
The server-log shows that the problem seems to be th following:
java.lang.ClassNotFoundException: javax.ws.rs.container.ContainerRequestFilter
My application uses Jersey 1.x, so I do not use "javax.ws.rs.container.ContainerRequestFilter" at all. I have read that Jersey 2.x is the new norm in 12.2.1.4.0, but Jersey 1.x should still be possible to use, right?
My application is packaged like detailed here: https://docs.oracle.com/middleware/12213/wls/RESTF/jersey-back-comp.htm#RESTF385
So I currently do not know where that Jersey 2.x Class from the deployment-error comes from. Somehow WebLogic Server seems to use Jersey 2.x though I just use the Extension "JAX-RS Jersey 1.x" under "Libraries and Classpath" from my REST-Project.
Has anybody any idea on how to tackle this problem? This would be greatly appreciated! :-)
Greetings, Mirko

PS.: This is the corresponding content from my web.xml (without the ADF-stuff)

<servlet>
       <servlet-name>rest</servlet-name>
       <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
       <init-param>
           <param-name>javax.ws.rs.Application</param-name>
           <param-value>xxx.xxx.rest.RestApplication</param-value>
       </init-param>
       <init-param>
           <param-name>com.sun.jersey.config.property.WadlGeneratorConfig</param-name>
           <param-value>xxx.xxx.rest.wadl.ExtendedWadlGeneratorConfig</param-value>
       </init-param>
       <init-param>
           <param-name>com.sun.jersey.spi.container.ResourceFilters</param-name>
           <param-value>xxx.xxx.rest.util.CacheFilterFactory;dguv.dguvgwa.rest.auth.AuthorizerFilterFactory</param-value>
       </init-param>
       <init-param>
            <!-- see: https://www.mkyong.com/webservices/jax-rs/json-example-with-jersey-jackson/ -->
           <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
           <param-value>true</param-value>
       </init-param>
       <init-param>
            <!-- see: http://kingsfleet.blogspot.de/2011/05/jersey-issue-when-running-with-adf.html -->
           <param-name>com.sun.jersey.config.feature.DisableXmlSecurity</param-name>
           <param-value>true</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
       <servlet-name>rest</servlet-name>
       <url-pattern>/rest/*</url-pattern>
   </servlet-mapping>
Comments
Post Details
Added on Sep 6 2021
1 comment
1,606 views