Anyways, I got it working through loading my context beans thru CXFServlet 
init-param instead of the Spring's ContextLoaderListener.

-Sonam

-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]] 
Sent: Friday, April 04, 2014 4:36 AM
To: [email protected]
Subject: Re: jaxrs cxf deployment issues on weblogic 12c

There seems to be a conflict between Jersey and CXF implementations...
Basically, if you'd like to use 2.0 API you need to avoid having 1.1 API and 
implementations loaded, especially in non-OSGI containers.
As I said CXF does the best effort to work alongside other JAX-RS API and 
implementations but may be sometimes one needs to restrict the container to 
loading something specific...

Cheers, Sergey
On 03/04/14 22:31, Sonam Samdupkhangsar wrote:
> If I exclude the javax.ws.rs-api-2.0 then the WebApplicationException 
> class I am using is from that package.  I have followed the direction on 
> http://docs.oracle.com/cd/E24329_01/web.1211/e24983/version.htm.  I included 
> the glassfish bundle:
> <dependency>
>                                                  
> <artifactId>jaxrs-ri</artifactId>
>                                                  
> <groupId>org.glassfish.jersey.bundles</groupId>
>                                                  <version>2.0</version>
>                                  </dependency>
>
> And it seems to work but it looks like Jersey is running behind when looking 
> at this WebLogic log message:
>
> <Apr 3, 2014 3:19:30 PM MDT> <Warning> 
> <weblogic.jaxrs.server.portable.servlet.JerseyServletContainerInitiali
> zer> <BEA-000000> <
> **********
> The application is using ServletContainerInitializer class 
> org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer that is 
> loaded 
> from:file:/home/myid/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/enterprise-caching/y2gltg/war/WEB-INF/lib/jaxrs-ri-2.0.jar.
>  This initializer overrides the one available in the system.
> **********>
>
> Are there anybody out there that has run CXF JAXRS 2.0 on WebLogic 12c?
>
> Thanks
> -Sonam
>
>
> **********************************************************************
> ******************
>
> Hi,
>
> You probably need to exclude javax.ws.rs-api-2.0 when building a 
> CXF-based war, 3.0.0-milestone2 is expected to completely support 
> JAX-RS
> 1.1 applications.
>
> Sergey
>
> On 21/03/14 21:41, Sonam Samdupkhangsar wrote:
>> Hi
>>
>> I have been seeing linkage errors when deploying CXF Jaxrs webapp on 
>> WebLogic 12c.  I
> read the migration to 3.x guideline but don't find any clues on it.
>>
>> The following is the error:
>>
>> -101216> <Servlet: "Jersey" failed to preload on startup in Web application: 
>> "enterprise-caching.war".
>> java.lang.LinkageError: ClassCastException: attempting to 
>> castzip:/home/swnepali/Oracle/Middleware/Oracle_Home/user_projects/do
>> mains/base_domain/servers/AdminServer/tmp/_WL_user/enterprise-caching
>> /y2gltg/war/WEB-INF/lib/javax.ws.rs-api-2.0.jar!/javax/ws/rs/ext/Runt
>> imeDelegate.classtojar:file:/home/swnepali/Oracle/Middleware/Oracle_H
>> ome/oracle_common/modules/jersey-core-1.17.1.jar!/javax/ws/rs/ext/Run
>> timeDelegate.class
>>
>>
>>
>>
>> thanks
>> -Sonam
>>
>
>

Reply via email to