Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Apache CXF RS Extensions issue in 2.4.0

0

52 views

I'm using Apache CXF version 2.4.0. I'm trying to create a Restful service.

The below example works in 2.3.4 but does not work in 2.4.0. What should I do different in beans config file?

When I include the below xml line in my bean config file.

<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /> 

I get the following stacktrace error:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml]

Offending resource: ServletContext resource [/WEB-INF/beans.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException:

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 at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)

My POM dependency is below. This will work for 2.3.4 but not for 2.4.0. Any suggestions? Is that xml extension line deprecated or included in another jar?

    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-bundle-jaxrs</artifactId>
        <version>2.3.4</version>
        <exclusions>
            <exclusion>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

asked June 14, 2011 3:05 pm CDT
posted via StackOverflow

1 Answers

2
Best answer
 

It's no longer needed. With 2.4.x, most of the META-INF/cxf files are no longer needed and can be removed. Really, the cxf.xml one is the only one needed.

answered June 22, 2011 3:22 am CDT

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions
Apache MaxClients Issue
February 13, 2011