CXF JAX-RS导致BusException [英] CXF JAX-RS is causing BusException
问题描述
在我的Spring(和Wicket)项目中使用Apache CXF添加RESTFul服务后,出现以下异常:
org.apache.cxf.BusException :没有注册名称空间 http://apache.org/cxf/binding/jaxrs 的绑定工厂。
我在Spring配置中包括了以下行,并认为这实际上可以解决我的问题。
import resource = classpath:META-INF / cxf / cxf-extension-jaxrs-binding.xml
非常感谢您提供有关如何解决此问题或在哪些方面寻找解决方案的想法的反馈。
<我正在使用Spring 3.0.0.RC2和Apache CXF 2.2.5。
(Maven对org.springframework.core,org.springframework.test,org.springframework.orm,org.springframework.web和cxf-bundle的依赖。)
预先感谢。
我真的通过简单地导入您在主<$ c $中提到的资源来解决了这个问题。 c> application-context.xml 文件:
< import resource = classpath:META- INF / cxf / cxf-extension-jaxrs-binding.xml />
我使用Spring 4.1.0.RELEASE和cxf 2.2.3。
过去,当我使用Spring 3.0和Apacy CXF 2.2.2时,不需要导入此文件。但是现在我在主 application-context.xml
文件中有以下情况:
< import resource = classpath:META-INF / cxf / cxf.xml />
< import resource = classpath:META-INF / cxf / cxf-servlet.xml />
< import resource = classpath:META-INF / cxf / cxf-extension-soap.xml />
< import resource = classpath:META-INF / cxf / cxf-extension-jaxrs-binding.xml />
对我来说很好。
After adding a RESTFul service using Apache CXF to my Spring (and Wicket) project I get the following exception:
org.apache.cxf.BusException: No binding factory for namespace http://apache.org/cxf/binding/jaxrs registered.
I have included the row below in my Spring configuration and thought this would actually solve my problem. But it did not.
import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
Any feedback regarding how to solve this problem or ideas in what areas to look for a solution would be greately appreciated.
I am using Spring 3.0.0.RC2 and Apache CXF 2.2.5. (Maven dependencies to org.springframework.core, org.springframework.test, org.springframework.orm, org.springframework.web and cxf-bundle.)
Thanks in advance.
Really I solved the problem by simply importing the resource you mentioned in the main application-context.xml
file:
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
I use Spring 4.1.0.RELEASE and cxf 2.2.3.
In past, when I was using Spring 3.0 and Apacy CXF 2.2.2 I did not need to import this file. But now I have the following situation in the main application-context.xml
file:
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" />
and it works fine for me.
这篇关于CXF JAX-RS导致BusException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!