WebLogic attempting to cast incompatible JAX-RS Versions

  Recieved this weblogic error :

Caused by: java.lang.LinkageError: ClassCastException: attempting to castjar:file:<MIDDLEWARE_HOME>/oracle_common/modules/jersey-core-1.18.jar!/javax/ws/rs/ext/RuntimeDelegate.class to zip:<DOMAIN_HOME>/servers/ReportServer/tmp/_WL_user/jax-rs/prnh4c/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/ext/RuntimeDelegate.class

        at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:146)

        at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)

        at javax.ws.rs.core.MediaType.valueOf(MediaType.java:179)

    ................................................................................... more message

 

 

To solve this, I had to configure my web-application.xml and weblogic.xml files like this below:

 

weblogic.xml

 

 

 

weblogic-application.xml