1 Reply Latest reply on May 9, 2015 1:45 AM by Jay SenSharma

    : Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace

    Raj Kumar Newbie

      Hi, i have configured spring jars as module and loading in jboss-deployment-structure.xml file as :

       

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

        <deployment>

        <dependencies>

                <module name="org.springframework" export="true"  services="import"/>

                <module name="com.mysql" export="true"  services="import"/>

              </dependencies>

        </deployment>

      </jboss-deployment-structure>

       

      Server running successfully, but when i deploy war file in deployment folder am getting below exception,

       

      can you please tell, why am getting this exception ?

       

      15:59:21,843 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReade

      r] (MSC service thread 1-1) Loading XML bean definitions from ServletContext res

      ource [/WEB-INF/applicationContext.xml]

      15:59:25,509 ERROR [org.springframework.web.context.ContextLoader] (MSC service

      thread 1-1) Context initialization failed: org.springframework.beans.factory.par

      1. sing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spr

      ing NamespaceHandler for XML schema namespace [http://www.springframework.org/sc

      hema/context]

      Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

       

              at org.springframework.beans.factory.parsing.FailFastProblemReporter.err

      or(FailFastProblemReporter.java:70) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEAS

      E]

              at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC

      • ontext.java:85) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC

      • ontext.java:80) [spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.er

      ror(BeanDefinitionParserDelegate.java:316) [spring-beans-4.1.6.RELEASE.jar:4.1.6

      .RELEASE]

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa

      rseCustomElement(BeanDefinitionParserDelegate.java:1424) [spring-beans-4.1.6.REL

      1. EASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa

      rseCustomElement(BeanDefinitionParserDelegate.java:1417) [spring-beans-4.1.6.REL

      1. EASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe

      1. ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:174) [spring-

      beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe

      1. ader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144) [sp

      ring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe

      1. ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100) [spri

      ng-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe

      rBeanDefinitions(XmlBeanDefinitionReader.java:510) [spring-beans-4.1.6.RELEASE.j

      ar:4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB

      eanDefinitions(XmlBeanDefinitionReader.java:392) [spring-beans-4.1.6.RELEASE.jar

      :4.1.6.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

      nDefinitions(XmlBeanDefinitionReader.java:336) [spring-beans-4.1.6.RELEASE.jar:4

      .1.6.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

      nDefinitions(XmlBeanDefinitionReader.java:304) [spring-beans-4.1.6.RELEASE.jar:4

      .1.6.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

      1. r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181) [spring-beans-4.1.6

      .RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

      1. r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217) [spring-beans-4.1.6

      .RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

      1. r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188) [spring-beans-4.1.6

      .RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.web.context.support.XmlWebApplicationContext.load

      BeanDefinitions(XmlWebApplicationContext.java:125) [spring-web-4.1.6.RELEASE.jar

      :4.1.6.RELEASE]

              at org.springframework.web.context.support.XmlWebApplicationContext.load

      BeanDefinitions(XmlWebApplicationContext.java:94) [spring-web-4.1.6.RELEASE.jar:

      1. 4.1.6.RELEASE]

              at org.springframework.context.support.AbstractRefreshableApplicationCon

      1. text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129) [spring-

      context-4.1.6.RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.obtain

      FreshBeanFactory(AbstractApplicationContext.java:537) [spring-context-4.1.6.RELE

      1. ASE.jar:4.1.6.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.refres

      h(AbstractApplicationContext.java:452) [spring-context-4.1.6.RELEASE.jar:4.1.6.R

      ELEASE]

              at org.springframework.web.context.ContextLoader.configureAndRefreshWebA

      pplicationContext(ContextLoader.java:403) [spring-web-4.1.6.RELEASE.jar:4.1.6.RE

      LEASE]

              at org.springframework.web.context.ContextLoader.initWebApplicationConte

      xt(ContextLoader.java:306) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

              at org.springframework.web.context.ContextLoaderListener.contextInitiali

      zed(ContextLoaderListener.java:106) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]

       

              at io.undertow.servlet.core.ApplicationListeners.contextInitialized(Appl

      1. icationListeners.java:173) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManag

      1. erImpl.java:193) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.s

      tartContext(UndertowDeploymentService.java:87)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.s

      tart(UndertowDeploymentService.java:72)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se

      1. rviceControllerImpl.java:1948)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont

      1. rollerImpl.java:1881)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

      java:1142) [rt.jar:1.8.0_40]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

      .java:617) [rt.jar:1.8.0_40]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

       

      15:59:25,710 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC0000

      01: Failed to start service jboss.undertow.deployment.default-server.default-hos

      1. t./: org.jboss.msc.service.StartException in service jboss.undertow.deployment.d

      efault-server.default-host./: Failed to start service

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont

      1. rollerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

      java:1142) [rt.jar:1.8.0_40]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

      .java:617) [rt.jar:1.8.0_40]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

      Caused by: java.lang.RuntimeException: org.springframework.beans.factory.parsing

      .BeanDefinitionParsingException: Configuration problem: Unable to locate Spring

      NamespaceHandler for XML schema namespace [http://www.springframework.org/schema

      /context]

      Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

       

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManag

      1. erImpl.java:222)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.s

      tartContext(UndertowDeploymentService.java:87)

              at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.s

      tart(UndertowDeploymentService.java:72)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(Se

      1. rviceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceCont

      1. rollerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

              ... 3 more

      Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingExcept

      ion: Configuration problem: Unable to locate Spring NamespaceHandler for XML sch

      ema namespace [http://www.springframework.org/schema/context]

      Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

       

              at org.springframework.beans.factory.parsing.FailFastProblemReporter.err

      or(FailFastProblemReporter.java:70)

              at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC

      • ontext.java:85)

              at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC

      • ontext.java:80)

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.er

      ror(BeanDefinitionParserDelegate.java:316)

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa

      rseCustomElement(BeanDefinitionParserDelegate.java:1424)

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa

      rseCustomElement(BeanDefinitionParserDelegate.java:1417)

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe

      1. ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:174)

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe

      1. ader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe

      1. ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe

      rBeanDefinitions(XmlBeanDefinitionReader.java:510)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB

      eanDefinitions(XmlBeanDefinitionReader.java:392)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

      nDefinitions(XmlBeanDefinitionReader.java:336)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea

      nDefinitions(XmlBeanDefinitionReader.java:304)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

      1. r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

      1. r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReade

      1. r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)

              at org.springframework.web.context.support.XmlWebApplicationContext.load

      BeanDefinitions(XmlWebApplicationContext.java:125)

              at org.springframework.web.context.support.XmlWebApplicationContext.load

      BeanDefinitions(XmlWebApplicationContext.java:94)

              at org.springframework.context.support.AbstractRefreshableApplicationCon

      1. text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)

              at org.springframework.context.support.AbstractApplicationContext.obtain

      FreshBeanFactory(AbstractApplicationContext.java:537)

              at org.springframework.context.support.AbstractApplicationContext.refres

      h(AbstractApplicationContext.java:452)

              at org.springframework.web.context.ContextLoader.configureAndRefreshWebA

      pplicationContext(ContextLoader.java:403)

              at org.springframework.web.context.ContextLoader.initWebApplicationConte

      xt(ContextLoader.java:306)

              at org.springframework.web.context.ContextLoaderListener.contextInitiali

      zed(ContextLoaderListener.java:106)

              at io.undertow.servlet.core.ApplicationListeners.contextInitialized(Appl

      1. icationListeners.java:173)

              at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManag

      1. erImpl.java:193)

              ... 7 more

       

      15:59:25,908 ERROR [org.jboss.as.controller.management-operation] (DeploymentSca

      nner-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deploym

      ent" => "TestRWD_JB60_Testing.war")]) - failure description: {"JBAS014671: F

      ailed services" => {"jboss.undertow.deployment.default-server.default-host./" =>

      "org.jboss.msc.service.StartException in service jboss.undertow.deployment.defa

      ult-server.default-host./: Failed to start service

          Caused by: java.lang.RuntimeException: org.springframework.beans.factory.par

      1. sing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spr

      ing NamespaceHandler for XML schema namespace [http://www.springframework.org/sc

      hema/context]

      Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

       

          Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingEx

      ception: Configuration problem: Unable to locate Spring NamespaceHandler for XML

      schema namespace [http://www.springframework.org/schema/context]

      Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]

      "}}

      15:59:26,879 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018

      559: Deployed "TestRWD_JB60_Testing.war" (runtime-name : "TestRWD_JB60_T

      1. esting.war")

      15:59:26,881 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBA

      S014774: Service status report

      JBAS014777:  Services which failed to start:      service jboss.undertow.deploy

      1. ment.default-server.default-host./: org.jboss.msc.service.StartException in serv

      ice jboss.undertow.deployment.default-server.default-host./: Failed to start ser

      vice