I am using maven to set up a simple REST webservice and deploying it to tomcat. Unfortunately I am not well versed in spring (enough to be dangerous), and I can not get a NamespaceHandler for the jaxrs namespace. Unfortunately there is no mention of the jaxrs namespace on this page http://cxf.apache.org/docs/schemas-and-namespaces.html. I suspect my spring.handlers is incorrected based on this error:
ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/myRestService]- Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxrs] Any guidance with respect to locating the correct NamespaceHandler or modification to the beans.xml is greatly appreciated. Thanks, Rob pom.xml : <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxrs</artifactId> <version>2.4.0</version> <type>pom</type> </dependency> The beans.xml I have copied from http://cxf.apache.org/docs/jaxrs-services-configuration.html: <?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"> <!-- do not use import statements if CXFServlet init parameters link to this beans.xml --> <import resource="classpath:META-INF/cxf/cxf.xml" /> <!--import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" / COMMENTED OUT because it does not exist--> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <jaxrs:server id="myRestService" address="/"> <jaxrs:serviceBeans> <ref bean="RestResource" /> </jaxrs:serviceBeans> </jaxrs:server> <bean id="RestResource" class="org.rob.RestResource" /> </beans> spring.handlers content: http\://cxf.apache.org/jaxrs=org.apache.cxf.jaxrs.spring.NamespaceHandler spring.schemas content: http\://cxf.apache.org/schemas/jaxrs.xsd=schemas/jaxrs.xsd
