REST CXF and Spring cxf-extension-jaxrs-binding File not found exception? REST CXF and Spring cxf-extension-jaxrs-binding File not found exception? spring spring

REST CXF and Spring cxf-extension-jaxrs-binding File not found exception?


According to this, this file is no longer required for cxf > 2.4.x.


I am also getting the exact same error. The error that I am getting is -

IOException parsing XML document from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it does not exist.

Even I read that the newer versions of cxf don't need anything other than cxf-rt-frontend-jaxrs. After I got these errors, I have added following dependencies in my pom file but they were of no help -

<dependency>    <groupId>org.apache.cxf</groupId>    <artifactId>cxf-rt-frontend-jaxrs</artifactId>    <version>2.6.2</version></dependency><dependency>    <groupId>org.apache.cxf</groupId>    <artifactId>cxf-rt-rs-extension-providers</artifactId>    <version>2.6.2</version></dependency><dependency>    <groupId>org.apache.cxf</groupId>    <artifactId>cxf-rt-rs-extension-search</artifactId>    <version>2.6.2</version></dependency>

I also do not understand the reason why almost all the tutorials detailing steps for building a REST service using CXF want you to include following 3 lines in spring config (when I can't possibly locate these files anywhere) -

<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"/>


Try removing the line that imports cxf-extension-jaxrs-binding.xml.The other 2 xml files are in the cxf-X.Y.Z.jar.For me that is cxf-2.7.7.jar.