Announcement Announcement Module
No announcement yet.
Unable to locate Spring NamespaceHandler Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to locate Spring NamespaceHandler


    Given the following xml (spring+cxf):

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="" xmlns:xsi=""
        xmlns:context="" xmlns:util=""
        <bean class="org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor" lazy-init="false" />
        <!-- CXF, JAX-WS, JAXB2 binding -->
        <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-servlet.xml" />
        <jaxws:endpoint id="CxfService" implementorClass="" implementor="#mariana.udal.serviceImpl"
            address="/SOAP" />
    I get the warning:

    Unable to locate Spring NamespaceHandler for XML schema namespace []
    I've added two cxf xsds into the eclipse xml catalog and that resolved my prior problems with eclipse not finding them. Now I'm left with the above warning and I'm not sure what it means or how to resolve it. The application works just fine in eclipse and also in tomcat as a war. So it's not fatal. However I normally work without any warnings.

    Therefore I have two questions. How do I resolve this and is this is a spring ide related problem, an eclipse related problem or a spring core container related problem? Please let me know if I should post to another part of the forum. Many thanks.

  • #2

    see here and here for more details on how to get rid of this warning.

    For the future we are working on something that prevents third-parties to develop a custom Spring IDE extension; having an OSGi compatible jar is enough to let the namespace handler operate in the Eclipse environment.




    • #3
      had same error but can't get passed the ERROR

      I had the same ERROR but this is an ERROR to me not a WARNING, so I can't start Tomcat5.5 in my IONA ARTIX Eclipse IDE.
      I'm using Spring2.0.8, IONA Artix 5.1.

      Please see the stack trace below. Any help is appreciated:

      2008-02-22 15:12:51,285 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/hosts]] - <Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListe ner>
      org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace []
      Offending resource: ServletContext resource [/WEB-INF/conf/hosts-ws-beans.xml]

      at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error( :68)
      at org.springframework.beans.factory.parsing.ReaderCo ntext.error(
      at org.springframework.beans.factory.parsing.ReaderCo ntext.error(
      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.error(BeanDefinitionParserDelegat
      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition
      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition
      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau
      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR
      at BeanDefinitionReader.loadBeanDefinitions(AbstractB
      at BeanDefinitionReader.loadBeanDefinitions(AbstractB
      at icationContext.loadBeanDefinitions(XmlWebApplicati
      at icationContext.loadBeanDefinitions(XmlWebApplicati
      at hableApplicationContext.refreshBeanFactory(Abstrac
      at ationContext.obtainFreshBeanFactory(AbstractApplic
      at ationContext.refresh(AbstractApplicationContext.ja va:324)
      at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(
      at org.springframework.web.context.ContextLoader.init WebApplicationContext(
      at org.springframework.web.context.ContextLoaderListe ner.contextInitialized( 49)
      at org.apache.catalina.core.StandardContext.listenerS tart(
      at org.apache.catalina.core.StandardContext.start(Sta
      at org.apache.catalina.core.ContainerBase.start(Conta
      at org.apache.catalina.core.StandardHost.start(Standa
      at org.apache.catalina.core.ContainerBase.start(Conta
      at org.apache.catalina.core.StandardEngine.start(Stan
      at org.apache.catalina.core.StandardService.start(Sta
      at org.apache.catalina.core.StandardServer.start(Stan
      at org.apache.catalina.startup.Catalina.start(Catalin
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.catalina.startup.Bootstrap.start(Bootst
      at org.apache.catalina.startup.Bootstrap.main(Bootstr


      • #4
        I had the same ERROR when running webserver (such as: tomcat,...) in Eclipse IDE. But it work fine when i run directlly with tomcat.
        I think that spring containner can not validate [] namespace.


        • #5
          Make sure you have cxf-rt-frontend-jaxws.jar on your classpath.
          That did the trick for me.


          • #6
            Same error, but during the deploy...


            In our case we are facing the same problem, but during the deploy into WAS 6.1.

            Since we try to upgrade CXF from version 2.2.6 to 2.3.4 the following error shows up:

            ERROR [server.startup : 1] (ContextLoader.
            java:204) - Context initialization failed
            org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace []
            Offending resource: class path resource [application-context.xml]

            Our application-context.xml is:

            <beans xmlns=""

            Any clue?
            Thanks in advance!


            • #7
              some how the problem is sorted...

              We just sorted the problem out... or at least worked around that.

              After paste jsr181-api.jar into the "lib/endorsed" IBM JDK folder, uninstall the application, then install it again into WAS the error did not show up and, even better, the app is up and running.

              According to CXF 2.3.4 does not really supports Spring 2.0.8.

              see you