You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Rupali Desai <rt...@gmail.com> on 2013/02/05 08:03:02 UTC
Using a ServletFilter with CXF
Hello,
I have built a web service using CXF. Now I have added a ServletFilter for
authentication. However when I configured the servlet filter and restarted
the Jetty, I see the following error
2013-02-05 12:18:54.920:WARN:oejuc.AbstractLifeCycle:FAILED Authentication
Filter: java.lang.IllegalStateException: No resource at
com.ews.service.filter.AuthenticationFilter/wsContext
java.lang.IllegalStateException: No resource at
com.zimbra.ews.service.filter.AuthenticationFilter/wsContext
at
org.eclipse.jetty.annotations.ResourceAnnotationHandler.handleField(ResourceAnnotationHandler.java:191)
at
org.eclipse.jetty.annotations.ResourceAnnotationHandler.doHandle(ResourceAnnotationHandler.java:70)
at
org.eclipse.jetty.annotations.AnnotationIntrospector$AbstractIntrospectableAnnotationHandler.handle(AnnotationIntrospector.java:71)
at
org.eclipse.jetty.annotations.AnnotationIntrospector.introspect(AnnotationIntrospector.java:96)
at
org.eclipse.jetty.annotations.AnnotationDecorator.introspect(AnnotationDecorator.java:163)
at
org.eclipse.jetty.annotations.AnnotationDecorator.decorateFilterInstance(AnnotationDecorator.java:77)
at
org.eclipse.jetty.servlet.ServletContextHandler$Context.createFilter(ServletContextHandler.java:1057)
Here are the contents of my web.xml
<filter>
<filter-name>Authentication Filter</filter-name>
<filter-class>com.ews.service.filter.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Authentication Filter</filter-name>
<servlet-name>cxf</servlet-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<description>Apache CXF Endpoint</description>
<display-name>cxf</display-name>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Thanks
RD