Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Spring DM in Servicemix 4: Unable to locate Spring NamespaceHandler for XML schema Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring DM in Servicemix 4: Unable to locate Spring NamespaceHandler for XML schema

    Hi,

    I'm using Spring DM within Servicemix 4 to instantiate a CXF client and
    to create a camel route for this component. The beans.xml file looks like
    the following:

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ctx="http://www.springframework.org/schema/context"
    xmlns:osgi="http://www.springframework.org/schema/osgi"
    xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
    xmlns:camel-osgi="http://camel.apache.org/schema/osgi"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-2.0.xsd
    http://www.springframework.org/schema/osgi
    http://www.springframework.org/schem...pring-osgi.xsd
    http://www.springframework.org/schema/osgi-compendium
    http://www.springframework.org/schem...compendium.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schem...ng-context.xsd
    http://camel.apache.org/schema/osgi
    http://camel.apache.org/schema/osgi/camel-osgi.xsd
    http://cxf.apache.org/jaxws
    http://cxf.apache.org/schemas/jaxws.xsd">

    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
    <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />

    <bean id="proxyFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean" >
    <property name="serviceClass" value="org.demo.ports.DemoPortType"/>
    <property name="address" value="http://localhost:8085/DEMO"/>
    </bean>

    <bean id="client" class="org.demo.ports.DemoPortType"
    factory-bean="proxyFactory" factory-method="create"/>

    <camel-osgi:camelContext xmlns="http://camel.apache.org/schema/spring">
    <route>
    <from uri="new-comp://route-test-demo?someParameter=ParameterData" />
    <to uri="file:///C:/tmp/test/out" />
    </route>
    </camel-osgi:camelContext>

    </beans>


    When the component (bundle) is started, I get the following error message:

    org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Failed to import bean definitions from URL locat
    ion [classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml]
    Offending resource: class path resource [META-INF/spring/beans.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefi nition
    ParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema
    /osgi]
    Offending resource: class path resource [META-INF/cxf/osgi/cxf-extension-osgi.xml]

    at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68)
    at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:85)
    at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:76)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.importBeanDefinitionResour ce(DefaultBeanDefinitionDocumentRe
    ader.java:182)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseDefaultElement(Defaul tBeanDefinitionDocumentReader.java
    :147)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.jav
    a:132)
    at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.
    java:92)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:507)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:398)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:342)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:310)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:212)
    at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:113)
    at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:80)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.jav
    a:123)
    at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:422)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:93)
    :
    :
    :

    If I remove the imports, I still get Unable to locate NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/osgi]

    Can someone tell me what needs to be done to resolve this issue?

    Thanks.

    -T
Working...
X