cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@iona.com>
Subject Re: CXF + Spring + Tomcat
Date Mon, 07 Jul 2008 11:11:45 GMT
Hi

It's likely that you may need to add a @Path("/") annotation to your
com.cxf.rs.service.EmployeeService resource class.

If you're using the code from  the latest trunk you'd likely get a
different type of message (no root resource class is found) if @Path() were missing so
in this case another possible reason for a failure is that you don't have a method with a
@GET request.
Cheers, Sergey

P.S.
By the way, it might make sense to start using a qualifier like JAX-RS in subjects due to
th efact there's a learge community of 
JAX-WS CXF users so that users not interested in JAX-RS could filter such messages out - and
it would help with getting some 
statistics as well...
I'll update the docs...

> Hi,
>
> I am using the JSR-311 example with Tomcat + Spring configration. When I am
> starting my Tomcat, the following error occured. Please help. Thanks in
> advance!
>
> Here is my bean.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:jaxrs="http://cxf.apache.org/jaxrs"
>  xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxrs
> http://cxf.apache.org/schemas/jaxrs.xsd">
>
>  <import resource="classpath:META-INF/cxf/cxf.xml" />
>  <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
> />
>  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>
>  <jaxrs:server id="employeeSer" address="/">
>    <jaxrs:serviceBeans>
>      <bean class="com.cxf.rs.service.EmployeeService" />
>    </jaxrs:serviceBeans>
>  </jaxrs:server>
>
> </beans>
>
> In web.xml, I have:
>
> <context-param>
>    <param-name>contextConfigLocation</param-name>
>    <param-value>WEB-INF/beans.xml</param-value>
>  </context-param>
>  <listener>
>    <listener-class>
>      org.springframework.web.context.ContextLoaderListener
>    </listener-class>
>  </listener>
>
> Error:
> Jul 5, 2008 12:02:15 AM org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor
> handleMessage
> SEVERE: No operation found for path: /, contentType: */*, Accept
> contentType: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
> application/x-shockwave-flash, */*
> Jul 5, 2008 12:02:15 AM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: .No operation matching request path / is
> found, ContentType : */*, Accept : image/gif, image/x-xbitmap, image/jpeg,
> image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint,
> application/msword, application/x-shockwave-flash, */*.
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:120)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
> at
> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:214)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:151)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:152)
> 

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Mime
View raw message