cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arul Dhesiaseelan <a...@fluxcorp.com>
Subject Re: Using Jersey 1.x for JAX-RS along CXF 2.1.x for JAX-WS
Date Fri, 27 Mar 2009 17:35:48 GMT
You may want to try disabling Jersey classpath scanning for resources 
and providers and instead use PackagesResourceConfig. This can be done 
by configuring web.xml:

    <servlet>
        <servlet-name>Jersey Web Application</servlet-name>
        
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>rest.resources;rest.providers</param-value>
        </init-param>
    </servlet>

-Arul

Sergey Beryozkin wrote:
> You may also want to check the Jersey user list - I thiink there were 
> some suggestions on how to deal with it - you need to setup some 
> Jersey (servlet ?) properties ....
>
> Cheers, Sergey
>
> ----- Original Message ----- From: "Daniel Kulp" <dkulp@apache.org>
> To: <users@cxf.apache.org>
> Cc: <ROBERTOJIMENOCA@terra.es>
> Sent: Friday, March 27, 2009 3:27 PM
> Subject: Re: Using Jersey 1.x for JAX-RS along CXF 2.1.x for JAX-WS
>
>
> On Mon March 16 2009 2:52:16 pm ROBERTOJIMENOCA@terra.es wrote:
>> I already have an application using Jersey 1.x for JAX-RS but I want 
>> to use
>> CXF 2.1.x for JAX-WS but when I include CXF Jersey seems to try to 
>> use CXF
>> providers and gives these errors. Are any of you guys using CXF with
>> Jersey?
>
> I don't think you'll be able to use the "bundle" jar.   However, if 
> you use
> the smaller module jars (in the modules directory), you could pull out 
> the
> stuff you don't want/need, the JAX-RS stuff being one of them.
>
> Dan
>
>
>>
>> 2009-03-16 18:01:14 com.sun.jersey.api.core.ClasspathResourceConfig init
>> INFO: Provider classes found:
>>   class org.apache.cxf.jaxrs.provider.AtomFeedProvider
>>   class org.apache.cxf.jaxrs.provider.AegisElementProvider
>>   class org.apache.cxf.jaxrs.provider.JAXBElementProvider
>>   class org.apache.cxf.jaxrs.provider.ActivationProvider
>>   class org.apache.cxf.jaxrs.provider.SourceProvider
>>   class org.apache.cxf.jaxrs.provider.XMLBeansJSONProvider
>>   class org.apache.cxf.jaxrs.impl.PathSegmentImpl
>>   class org.apache.cxf.jaxrs.provider.XMLBeansElementProvider
>>   class org.apache.cxf.jaxrs.provider.StringProvider
>>   class org.apache.cxf.jaxrs.provider.AtomEntryProvider
>>   class org.apache.cxf.jaxrs.provider.JSONProvider
>>   class org.apache.cxf.jaxrs.provider.FormEncodingReaderProvider
>>
>> ...
>>
>> 2009-03-16 18:26:50 org.apache.catalina.core.StandardWrapperValve invoke
>> SEVERE: Servlet.service() for servlet Jersey Web Application threw
>> exception java.lang.AbstractMethodError:
>> javax.ws.rs.core.UriBuilder.replacePath(Ljava/lang/String;)Ljavax/ws/rs/cor 
>>
>> e/UriBuilder; at
>> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContai 
>>
>> ner.java:302) at
>> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContai 
>>
>> ner.java:239) at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio 
>>
>> nFilterChain.java:290) at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC 
>>
>> hain.java:206) at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j 
>>
>> ava:233) at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j 
>>
>> ava:175) at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 
>>
>> 8) at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 
>>
>> 2) at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav 
>>
>> a:109) at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) 
>>
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
>>
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt 
>>
>> p11Protocol.java:583) at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
>> at
>> java.lang.Thread.run(Thread.java:636)
>>
>>
>>
>> Ahora también puedes acceder a tu correo Terra desde el móvil.
>> Infórmate pinchando aquí.
>



Mime
View raw message