Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuration Issue: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx]

During JBOSS server startup i get this error,

19:44:59,307 ERROR [STDERR] 23813 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
19:44:59,307 ERROR [STDERR] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx]
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]
19:44:59,307 ERROR [STDERR]     at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
19:44:59,307 ERROR [STDERR]     at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
19:44:59,307 ERROR [STDERR]     at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
19:44:59,307 ERROR [STDERR]     at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281)
19:44:59,307 ERROR [STDERR]     at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1294)
19:44:59,307 ERROR [STDERR]     at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
19:44:59,307 ERROR [STDERR]     at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)

and this how my application.xml looks like,

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

I am using spring 2.5.6... Any suggestion on the error..

like image 323
ACP Avatar asked Dec 01 '22 21:12

ACP


1 Answers

This could be because you are missing the spring-tx*.jar file in your classpath. Can you verify if this file is in the classpath.

like image 96
Biju Kunjummen Avatar answered Dec 15 '22 03:12

Biju Kunjummen