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

  • Unable to locate Spring NamespaceHandler

    Hi,

    Given the following xml (spring+cxf):

    Code:
    <?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:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"
        xmlns:jaxws="http://cxf.apache.org/jaxws"
        xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"
        default-lazy-init="true">
    
        <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="com.foo.UdalServiceImpl" implementor="#mariana.udal.serviceImpl"
            address="/SOAP" />
    
    </beans>
    I get the warning:

    Code:
    Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxws]
    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
    Hi,

    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.

    Cheers

    Christian

    Comment


    • #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 [http://cxf.apache.org/jaxws]
      Offending resource: ServletContext resource [/WEB-INF/conf/hosts-ws-beans.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:80)
      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.error(BeanDefinitionParserDelegat e.java:261)
      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1120)
      at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1113)
      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:133)
      at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:90)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:468)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:363)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:313)
      at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:290)
      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:131)
      at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:147)
      at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:124)
      at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:92)
      at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:101)
      at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:394)
      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:324)
      at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:246)
      at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:189)
      at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 49)
      at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3729)
      at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4187)
      at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1013)
      at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:718)
      at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1013)
      at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:442)
      at org.apache.catalina.core.StandardService.start(Sta ndardService.java:450)
      at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:709)
      at org.apache.catalina.startup.Catalina.start(Catalin a.java:551)
      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 rap.java:294)
      at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:432)

      Comment


      • #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 [http://cxf.apache.org/jaxws] namespace.

        Comment


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

          Comment


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

            Greetings!

            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 [http://cxf.apache.org/jaxws]
            Offending resource: class path resource [application-context.xml]

            Our application-context.xml is:

            <beans xmlns="http://www.springframework.org/schema/beans"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:jaxws="http://cxf.apache.org/jaxws"
            xmlns:jee="http://www.springframework.org/schema/jee"
            xmlns:tx="http://www.springframework.org/schema/tx"
            xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schem...spring-jee.xsd
            http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">

            Any clue?
            Thanks in advance!

            Comment


            • #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 http://cxf.547215.n5.nabble.com/CXF-...tt4342051.html CXF 2.3.4 does not really supports Spring 2.0.8.

              see you

              Comment

              Working...
              X