You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gijsbert van den Brink <gv...@telemc.nl> on 2011/07/22 10:01:00 UTC

"Can't find the the request for ...'s Observer" after update to 2.4.1

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.

-- 
Regards,

Gijsbert



Re: "Can't find the the request for ...'s Observer" after update to 2.4.1

Posted by Gijsbert van den Brink <gv...@telemc.nl>.
On 22-7-2011 18:57, Sergey Beryozkin wrote:
> 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
>> I don't use maven, but I've created a simple project to reproduce the issue,
>> you can download it here: http://telemc.nl/RestTest.zip
>> Source files and war file are included.
>> If I replace cxf-2.4.1.jar with cxf-2.4.0.jar everything works fine.
>>
> Thanks for providing the test project. if you update jaxrs:server
> address from "/REST/" to "/REST" then it will work.
> There was some related refactoring in CXF 2.4.1 which actually made it
> possible for multiple endpoints with overlapping addresses be created,
> but some minor fix needs to be applied around this case - in meantime
> just update to "/REST"
Thanks, that solved the problem!

Gijsbert



Re: "Can't find the the request for ...'s Observer" after update to 2.4.1

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

On Fri, Jul 22, 2011 at 2:12 PM, Gijsbert van den Brink
<gv...@telemc.nl> wrote:
> On 7/22/11 2:08 PM, Sergey Beryozkin wrote:
>>
>> So context is effectively "" ?
>
> That's correct.
>>
>> 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
>
> I don't use maven, but I've created a simple project to reproduce the issue,
> you can download it here: http://telemc.nl/RestTest.zip
> Source files and war file are included.
> If I replace cxf-2.4.1.jar with cxf-2.4.0.jar everything works fine.
>
Thanks for providing the test project. if you update jaxrs:server
address from "/REST/" to "/REST" then it will work.
There was some related refactoring in CXF 2.4.1 which actually made it
possible for multiple endpoints with overlapping addresses be created,
but some minor fix needs to be applied around this case - in meantime
just update to "/REST"

Cheers, Sergey

> Gijsbert
>
>> Cheers, Sergey
>>
>> On Fri, Jul 22, 2011 at 1:00 PM, Gijsbert van den Brink
>> <gv...@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
>>>> <gv...@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

Re: "Can't find the the request for ...'s Observer" after update to 2.4.1

Posted by Gijsbert van den Brink <gv...@telemc.nl>.
On 7/22/11 2:08 PM, Sergey Beryozkin wrote:
> So context is effectively "" ?
That's correct.
> 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
I don't use maven, but I've created a simple project to reproduce the 
issue, you can download it here: http://telemc.nl/RestTest.zip
Source files and war file are included.
If I replace cxf-2.4.1.jar with cxf-2.4.0.jar everything works fine.

Gijsbert

> Cheers, Sergey
>
> On Fri, Jul 22, 2011 at 1:00 PM, Gijsbert van den Brink
> <gv...@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
>>> <gv...@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
>>>>
>>>>
>>>>
>>>
>>
>
>


Re: "Can't find the the request for ...'s Observer" after update to 2.4.1

Posted by Sergey Beryozkin <sb...@gmail.com>.
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
<gv...@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
>> <gv...@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

Re: "Can't find the the request for ...'s Observer" after update to 2.4.1

Posted by Gijsbert van den Brink <gv...@telemc.nl>.
On 7/22/11 1:25 PM, Sergey Beryozkin wrote:
> Hi
>
> On Fri, Jul 22, 2011 at 9:01 AM, Gijsbert van den Brink
> <gv...@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
>>
>>
>>
>
>


Re: "Can't find the the request for ...'s Observer" after update to 2.4.1

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

On Fri, Jul 22, 2011 at 9:01 AM, Gijsbert van den Brink
<gv...@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 can try later on to reproduce it
Cheers, Sergey

> --
> Regards,
>
> Gijsbert
>
>
>



-- 
Sergey Beryozkin

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