You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Jonathan Anstey <ja...@iona.com> on 2007/03/06 00:53:39 UTC

Using CXF with ServiceMix 3.1

Hi all,

I've been trying to use CXF with the ServiceMix 3.1 release (CXF 
currently supports SM 3.0). With minor modifications (i.e. version 
numbers), the unit tests pass without a hitch, as does the 
integration/JBI/external_provider_external_consumer demo. All other JBI 
samples fail with the following error:

org.springframework.beans.factory.BeanDefinitionStoreException: 
Unexpected exception parsing XML document from class path resource 
[META-INF/cxf/cxf.xml]; nested exception is 
java.lang.IllegalArgumentException: Class 
[org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not 
implement the NamespaceHandler interface
Caused by: java.lang.IllegalArgumentException: Class 
[org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not 
implement the NamespaceHandler interface
        at 
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:119)
        at 
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:96)
        at 
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.<init>(DefaultNamespaceHandlerResolver.java:82)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver(XmlBeanDefinitionReader.java:530)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext(XmlBeanDefinitionReader.java:519)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:499)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:407)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
        at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
        at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
        at 
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292)
        at 
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:73)
        at 
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:61)
        at 
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:52)
        at 
org.apache.cxf.jbi.se.state.ServiceEngineShutdown.initializeBus(ServiceEngineShutdown.java:104)
        at 
org.apache.cxf.jbi.se.state.ServiceEngineShutdown.initSE(ServiceEngineShutdown.java:87)
        at 
org.apache.cxf.jbi.se.state.ServiceEngineShutdown.changeState(ServiceEngineShutdown.java:51)
        at 
org.apache.cxf.jbi.se.CXFServiceEngine.init(CXFServiceEngine.java:81)
        ...

The error is logged by servicemix when I try to start the 
CXFServiceEngine. Does anyone have any hints as to what could be wrong here?

Thanks,
Jon


Re: Using CXF with ServiceMix 3.1

Posted by ja...@mail.ooc.nf.ca.
Thanks Guillaume! I'll have to try this out.
Cheers,
Jon

On Tue, Mar 06, 2007 at 08:55:58AM +0100, Guillaume Nodet wrote:
> This is a classloading problem that occurs with spring.
> spring-core is included in the container classpath, so you
> can try switching to a self-first JBI classloader (in the jbi.xml
> descriptor file for the CXF component).
> 
> On 3/6/07, Jonathan Anstey <ja...@iona.com> wrote:
> >
> > Hi all,
> >
> > I've been trying to use CXF with the ServiceMix 3.1 release (CXF
> > currently supports SM 3.0). With minor modifications (i.e. version
> > numbers), the unit tests pass without a hitch, as does the
> > integration/JBI/external_provider_external_consumer demo. All other JBI
> > samples fail with the following error:
> >
> > org.springframework.beans.factory.BeanDefinitionStoreException:
> > Unexpected exception parsing XML document from class path resource
> > [META-INF/cxf/cxf.xml]; nested exception is
> > java.lang.IllegalArgumentException: Class
> > [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not
> > implement the NamespaceHandler interface
> > Caused by: java.lang.IllegalArgumentException: Class
> > [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not
> > implement the NamespaceHandler interface
> >         at
> >
> > org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings
> > (DefaultNamespaceHandlerResolver.java:119)
> >         at
> > org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver
> > .<init>(DefaultNamespaceHandlerResolver.java:96)
> >         at
> > org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver
> > .<init>(DefaultNamespaceHandlerResolver.java:82)
> >         at
> >
> > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver
> > (XmlBeanDefinitionReader.java:530)
> >         at
> >
> > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext
> > (XmlBeanDefinitionReader.java:519)
> >         at
> >
> > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions
> > (XmlBeanDefinitionReader.java:499)
> >         at
> >
> > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions
> > (XmlBeanDefinitionReader.java:407)
> >         at
> >
> > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
> > (XmlBeanDefinitionReader.java:357)
> >         at
> >
> > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
> > (XmlBeanDefinitionReader.java:334)
> >         at
> >
> > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions
> > (AbstractBeanDefinitionReader.java:126)
> >         at
> >
> > org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions
> > (AbstractXmlApplicationContext.java:109)
> >         at
> >
> > org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions
> > (AbstractXmlApplicationContext.java:79)
> >         at
> >
> > org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory
> > (AbstractRefreshableApplicationContext.java:94)
> >         at
> > org.springframework.context.support.AbstractApplicationContext.refresh(
> > AbstractApplicationContext.java:292)
> >         at
> > org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> > :73)
> >         at
> > org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> > :61)
> >         at
> > org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> > :52)
> >         at
> > org.apache.cxf.jbi.se.state.ServiceEngineShutdown.initializeBus(
> > ServiceEngineShutdown.java:104)
> >         at
> > org.apache.cxf.jbi.se.state.ServiceEngineShutdown.initSE(
> > ServiceEngineShutdown.java:87)
> >         at
> > org.apache.cxf.jbi.se.state.ServiceEngineShutdown.changeState(
> > ServiceEngineShutdown.java:51)
> >         at
> > org.apache.cxf.jbi.se.CXFServiceEngine.init(CXFServiceEngine.java:81)
> >         ...
> >
> > The error is logged by servicemix when I try to start the
> > CXFServiceEngine. Does anyone have any hints as to what could be wrong
> > here?
> >
> > Thanks,
> > Jon
> >
> >
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/

Re: Using CXF with ServiceMix 3.1

Posted by Guillaume Nodet <gn...@gmail.com>.
This is a classloading problem that occurs with spring.
spring-core is included in the container classpath, so you
can try switching to a self-first JBI classloader (in the jbi.xml
descriptor file for the CXF component).

On 3/6/07, Jonathan Anstey <ja...@iona.com> wrote:
>
> Hi all,
>
> I've been trying to use CXF with the ServiceMix 3.1 release (CXF
> currently supports SM 3.0). With minor modifications (i.e. version
> numbers), the unit tests pass without a hitch, as does the
> integration/JBI/external_provider_external_consumer demo. All other JBI
> samples fail with the following error:
>
> org.springframework.beans.factory.BeanDefinitionStoreException:
> Unexpected exception parsing XML document from class path resource
> [META-INF/cxf/cxf.xml]; nested exception is
> java.lang.IllegalArgumentException: Class
> [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not
> implement the NamespaceHandler interface
> Caused by: java.lang.IllegalArgumentException: Class
> [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not
> implement the NamespaceHandler interface
>         at
>
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings
> (DefaultNamespaceHandlerResolver.java:119)
>         at
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver
> .<init>(DefaultNamespaceHandlerResolver.java:96)
>         at
> org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver
> .<init>(DefaultNamespaceHandlerResolver.java:82)
>         at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver
> (XmlBeanDefinitionReader.java:530)
>         at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext
> (XmlBeanDefinitionReader.java:519)
>         at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions
> (XmlBeanDefinitionReader.java:499)
>         at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions
> (XmlBeanDefinitionReader.java:407)
>         at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
> (XmlBeanDefinitionReader.java:357)
>         at
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
> (XmlBeanDefinitionReader.java:334)
>         at
>
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions
> (AbstractBeanDefinitionReader.java:126)
>         at
>
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions
> (AbstractXmlApplicationContext.java:109)
>         at
>
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions
> (AbstractXmlApplicationContext.java:79)
>         at
>
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory
> (AbstractRefreshableApplicationContext.java:94)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:292)
>         at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> :73)
>         at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> :61)
>         at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java
> :52)
>         at
> org.apache.cxf.jbi.se.state.ServiceEngineShutdown.initializeBus(
> ServiceEngineShutdown.java:104)
>         at
> org.apache.cxf.jbi.se.state.ServiceEngineShutdown.initSE(
> ServiceEngineShutdown.java:87)
>         at
> org.apache.cxf.jbi.se.state.ServiceEngineShutdown.changeState(
> ServiceEngineShutdown.java:51)
>         at
> org.apache.cxf.jbi.se.CXFServiceEngine.init(CXFServiceEngine.java:81)
>         ...
>
> The error is logged by servicemix when I try to start the
> CXFServiceEngine. Does anyone have any hints as to what could be wrong
> here?
>
> Thanks,
> Jon
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/