The exception here

*org.springframework.beans.FatalBeanException: Class
[org.apache.cxf.jaxrs.spring.NamespaceHandler] for namespace
[http://cxf.apache.org/jaxrs] does not implement the
[org.springframework.beans.factory.xml.NamespaceHandler] interface*

actually is the class loader issue, as class 
org.apache.cxf.jaxrs.spring.NamespaceHandler actually implements the 
org.springframework.beans.factory.xml.NamespaceHandler interface.

Anyway, add Import-Package for spring related packages should help
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋



On 2013-6-25, at 下午1:56, Veeraraghavan wrote:

> Hi,
> 
> I tried as per you suggestion. I removed all the spring related jar from the
> lib folder of the war and then added the following to the MAINFEST.MF.
> 
> Bundle-ManifestVersion: 2.0
> Bundle-SymbolicName:
> Class-Path: Apache-CXF/build/classes
> 
> Then, I bundled the project as .WAR file and deployed it in the service mix.
> I'm still getting the same exception. Actually, I'm not facing any class
> loader related exception.
> 
> *org.springframework.beans.FatalBeanException: Class
> [org.apache.cxf.jaxrs.spring.NamespaceHandler] for namespace
> [http://cxf.apache.org/jaxrs] does not implement the
> [org.springframework.beans.factory.xml.NamespaceHandler] interface*
> 
> I have the following in my beans.xml.
> 
> *<?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";
> xmlns:osgi="http://www.springframework.org/schema/osgi";
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context-3.0.xsd
> http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
> http://www.springframework.org/schema/osgi
> http://www.springframework.org/schema/osgi/spring-osgi.xsd";> <jaxrs:server
> id="base" address="/"> <jaxrs:serviceBeans> <ref bean="StudentService" />
> </jaxrs:serviceBeans> </jaxrs:server> <bean id="StudentService"
> class="com.sample.cxf.service.StudentDetailsImpl" /> </beans>*
> 
> Is there something I'm missing here?
> 
> Thanks.
> 
> 
> 
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/Apache-CXF-with-Spring-beans-deployed-on-Service-mix-throws-org-springframework-beans-factory-BeanDen-tp5717092p5717109.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to