You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sonam Samdupkhangsar <So...@imail.org> on 2014/04/03 23:31:36 UTC

jaxrs cxf deployment issues on weblogic 12c

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.JerseyServletContainerInitializer> <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/domains/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/RuntimeDelegate.classtojar:file:/home/swnepali/Oracle/Middleware/Oracle_Home/oracle_common/modules/jersey-core-1.17.1.jar!/javax/ws/rs/ext/RuntimeDelegate.class
>
>
>
>
> thanks
> -Sonam
>


RE: jaxrs cxf deployment issues on weblogic 12c

Posted by vineetkala11 <vi...@gmail.com>.
Hi Sonam,

Could you please suggest how did you achieve this .


Thanks



--
View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-cxf-deployment-issues-on-weblogic-12c-tp5742398p5760405.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: jaxrs cxf deployment issues on weblogic 12c

Posted by pskarthic <ka...@pointelsolutions.com>.
I have tried all the above but I am getting below exception, please advise

####<6 Aug, 2018, 12:22:06,360 PM IST> <Error> <HTTP> <PTLLTP008>
<AdminServer> <[ACTIVE] ExecuteThread: '11' for queue:
'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <>
<b2276e62-bf3f-4b42-80a7-cc63a3297980-00000028> <1533538326360>
<[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] >
<BEA-101216> <Servlet: "JAX-RS/Jersey#1" failed to preload on startup in Web
application: "GenServiceV1.9.war".
java.lang.NoClassDefFoundError: org/apache/abdera/model/Element
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethods(Class.java:1975)
    at
org.glassfish.jersey.server.model.IntrospectionModeller$2.run(IntrospectionModeller.java:253)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.glassfish.jersey.server.model.IntrospectionModeller.getAllDeclaredMethods(IntrospectionModeller.java:247)
    at
org.glassfish.jersey.server.model.IntrospectionModeller.checkForNonPublicMethodIssues(IntrospectionModeller.java:172)
    at
org.glassfish.jersey.server.model.IntrospectionModeller.doCreateResourceBuilder(IntrospectionModeller.java:119)
    at
org.glassfish.jersey.server.model.IntrospectionModeller.access$000(IntrospectionModeller.java:80)
    at
org.glassfish.jersey.server.model.IntrospectionModeller$1.call(IntrospectionModeller.java:112)
    at
org.glassfish.jersey.server.model.IntrospectionModeller$1.call(IntrospectionModeller.java:109)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)



--
Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html

Re: jaxrs cxf deployment issues on weblogic 12c

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

I've collected some info here:
http://cxf.apache.org/docs/application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-WebLogic

Cheers, Sergey
On 09/12/15 10:03, cdac.vikram@gmail.com wrote:
> Hi Folks,
>
> I am deploying my code to weblogic 12c and getting the below jersey error:
> because of this I am not getting UI properly, no css, no js nothing getting
> loaded and getting 500 Internal server error
>
> weblogic.jaxrs.server.portable.servlet.JerseyServletContainerInitializer
> onStartup
> INFO: The list of resource packages:org.apache.cxf.jaxrs.servlet
> org.apache.cxf.jaxrs.validation org.apache.cxf.jaxrs.provider
>
> but I dont have jersey in my project.
>
> I added below config in my weblogic.xml and deployed and tested but still
> the problem is there.
>
> <wls:prefer-application-resources>
>          <wls:resource-name>META-INF/services/*</wls:resource-name>
>          </wls:prefer-application-resources>
>
> Please suggest me how to resolve  this.
>
> Thanks,
> Vikram
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-cxf-deployment-issues-on-weblogic-12c-tp5742398p5763737.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

RE: jaxrs cxf deployment issues on weblogic 12c

Posted by "cdac.vikram@gmail.com" <cd...@gmail.com>.
Hi Folks,

I am deploying my code to weblogic 12c and getting the below jersey error:
because of this I am not getting UI properly, no css, no js nothing getting
loaded and getting 500 Internal server error

weblogic.jaxrs.server.portable.servlet.JerseyServletContainerInitializer
onStartup
INFO: The list of resource packages:org.apache.cxf.jaxrs.servlet
org.apache.cxf.jaxrs.validation org.apache.cxf.jaxrs.provider

but I dont have jersey in my project. 

I added below config in my weblogic.xml and deployed and tested but still
the problem is there.

<wls:prefer-application-resources>
        <wls:resource-name>META-INF/services/*</wls:resource-name>
        </wls:prefer-application-resources>

Please suggest me how to resolve  this.

Thanks,
Vikram



--
View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-cxf-deployment-issues-on-weblogic-12c-tp5742398p5763737.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: jaxrs cxf deployment issues on weblogic 12c

Posted by Sergey Beryozkin <sb...@gmail.com>.
Well, I've no experience with WebLogic at all :-)

Thanks for the information, I've added a link to your last message

Thanks, Sergey
On 13/04/15 22:19, bajajyo wrote:
> Below is the way to resolve this issue in weblogic 12c and cxf  3.x and
> jax-rs 2.x
>
>              Add below entries in weblogic application xml. This will avoid
> weblogic to by default start jersey in case web.xml contains 3.0 xsd and
> jax-rs is being used by application. weblogic jersey-core-1.18.jar has
> meta-inf/services folder.
>
>              <wls:prefer-application-resources>
>          <wls:resource-name>META-INF/services/*</wls:resource-name>
>          </wls:prefer-application-resources>
>
>               Weblogic 12c contain jersey 1.1.8 jar which is having JAX-RS
> 1.1 spec. In case you are using JAX-RS 2.x spec, you need to include that
> jar in application war or ear. Please also add below entry to use jax-rs
> specific classes from application jar.
>
>                 <wls:package-name>javax.ws.rs.*</wls:package-name>
>
>                   We struggled a lot for this issue and there is no
> documentation for this issue in CXF.
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-cxf-deployment-issues-on-weblogic-12c-tp5742398p5756013.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


RE: jaxrs cxf deployment issues on weblogic 12c

Posted by bajajyo <yo...@wyn.com>.
Below is the way to resolve this issue in weblogic 12c and cxf  3.x and
jax-rs 2.x

            Add below entries in weblogic application xml. This will avoid
weblogic to by default start jersey in case web.xml contains 3.0 xsd and
jax-rs is being used by application. weblogic jersey-core-1.18.jar has
meta-inf/services folder.

            <wls:prefer-application-resources>
        <wls:resource-name>META-INF/services/*</wls:resource-name>
        </wls:prefer-application-resources>

             Weblogic 12c contain jersey 1.1.8 jar which is having JAX-RS
1.1 spec. In case you are using JAX-RS 2.x spec, you need to include that
jar in application war or ear. Please also add below entry to use jax-rs
specific classes from application jar.

               <wls:package-name>javax.ws.rs.*</wls:package-name>

                 We struggled a lot for this issue and there is no
documentation for this issue in CXF.





          



--
View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-cxf-deployment-issues-on-weblogic-12c-tp5742398p5756013.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: jaxrs cxf deployment issues on weblogic 12c

Posted by Sonam Samdupkhangsar <So...@imail.org>.
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:sberyozkin@gmail.com] 
Sent: Friday, April 04, 2014 4:36 AM
To: users@cxf.apache.org
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
>>
>
>


Re: jaxrs cxf deployment issues on weblogic 12c

Posted by Sergey Beryozkin <sb...@gmail.com>.
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.JerseyServletContainerInitializer> <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/domains/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/RuntimeDelegate.classtojar:file:/home/swnepali/Oracle/Middleware/Oracle_Home/oracle_common/modules/jersey-core-1.17.1.jar!/javax/ws/rs/ext/RuntimeDelegate.class
>>
>>
>>
>>
>> thanks
>> -Sonam
>>
>
>