cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: "Can't find the the request for ...'s Observer" after update to 2.4.1
Date Fri, 22 Jul 2011 12:08:36 GMT
So context is effectively "" ?

Thanks for providing the info below, but I'm afraid I can't test that
- so many variables are there...
If you could give me a favor and create a simple maven war project,
then it can help

Cheers, Sergey

On Fri, Jul 22, 2011 at 1:00 PM, Gijsbert van den Brink
<gvandenbrink@telemc.nl> wrote:
> On 7/22/11 1:25 PM, Sergey Beryozkin wrote:
>>
>> Hi
>>
>> On Fri, Jul 22, 2011 at 9:01 AM, Gijsbert van den Brink
>> <gvandenbrink@telemc.nl>  wrote:
>>>
>>> Hello,
>>>
>>> After an update from 2.4.0 to 2.4.1 I get this error on incoming JAX-RS
>>> calls: "Can't find the the request for<url>'s Observer".
>>>
>>> When I call the service like this:
>>> https://example.com/cxf_services/REST/status/myservice/value1/value2 it
>>> returns "No service was found." and a warning message is printed in the
>>> server logs.
>>>
>>> If I look at the status page (/cxf_services/REST/?_wadl&_type=xml)
>>> everything looks ok:
>>> <application>
>>> <grammars/>
>>> <resources base="https://example.com/cxf_services/REST/">
>>> <resource path="/status">
>>> <resource path="/myservice/{param1}/{param2}">
>>> <param name="param1" style="template" type="xs:string"/>
>>> <param name="param2" style="template" type="xs:string"/>
>>> <method name="GET">
>>> <request/>
>>> <response>
>>> <representation mediaType="text/plain">
>>> <param name="result" style="plain" type="xs:int"/>
>>> </representation>
>>> </response>
>>> </method>
>>> </resource>
>>> </resource>
>>> </resources>
>>> </application>
>>>
>>>
>>> Where does the "'s Observer" suffix come from? I've never seen it before.
>>>
>> May be that message needs to be changed, I believe the idea was to
>> indicate no handler/endpoint was
>> found which could deal with a given URI.
>> Can you give more info please, which container you use, what is the
>> context name, is it "cxf_services" ?
>> What is the jaxrs endpoint address value, '/REST' ?
>
> I'm using Tomcat 6.0.29, Spring 2.5 and CXF 2.4.1.
> /cxf_services is the CXFServlet mapping, /REST is the jaxrs endpoint and
> /status/myservice is the service itself.
>
> Here's the relevant configuration from web.xml, the spring
> application-context and the service class:
>
> ==== web.xml ====
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>
>            /WEB-INF/applicationContext.xml
>            /WEB-INF/jndiDataSource.xml
>            /WEB-INF/applicationContext-spring-security.xml
>            /WEB-INF/cxf-beans.xml
> </param-value>
> </context-param>
>
> <listener>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
>
> <servlet>
> <servlet-name>CXFServlet</servlet-name>
> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
> <load-on-startup>3</load-on-startup>
> </servlet>
>
> <servlet>
> <servlet-name>SpringDispatcher</servlet-name>
> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
> <load-on-startup>2</load-on-startup>
> <init-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>
>                /WEB-INF/SpringDispatcher-servlet.xml
> </param-value>
> </init-param>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>CXFServlet</servlet-name>
> <url-pattern>/cxf_services/*</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
> <servlet-name>SpringDispatcher</servlet-name>
> <url-pattern>*.action</url-pattern>
> </servlet-mapping>
>
>
> ==== cxf-beans.xml ====
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xmlns:jaxws="http://cxf.apache.org/jaxws"
>    xmlns:jaxrs="http://cxf.apache.org/jaxrs"
>    xmlns:context="http://www.springframework.org/schema/context"
>    xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
> http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context-2.5.xsd">
>
> <import resource="classpath:META-INF/cxf/cxf.xml" />
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
> <context:component-scan base-package="com.example" />
>
> <jaxrs:server id="restContainer" address="/REST/">
> <jaxrs:serviceBeans>
> <ref bean="statusService" />
> </jaxrs:serviceBeans>
> </jaxrs:server>
>
>
> ==== StatusService.java ====
>
> @Service("statusService")
> @Path("status")
> public class StatusService {
>
>    @GET
>    @Path("myservice/{param1}/{param2}")
>    @Produces("text/plain")
>    public int getCount(@PathParam("param1") String param1,
> @PathParam("param2") String param2) {
>        // do stuff
>    }
> }
>
>> I can try later on to reproduce it
>> Cheers, Sergey
>>
>>> --
>>> Regards,
>>>
>>> Gijsbert
>>>
>>>
>>>
>>
>>
>
>



-- 
Sergey Beryozkin

http://sberyozkin.blogspot.com
Talend - http://www.talend.com

Mime
View raw message