加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

配置问题:无法找到XML架构命名空间的Spring NamespaceHandler [

发布时间:2020-12-16 23:26:29 所属栏目:百科 来源:网络整理
导读:在JBOSS服务器启动期间我收到此错误, 19:44:59,307 ERROR [STDERR] 23813 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed19:44:59,307 ERROR [STDERR] org.springframework.beans.factory.parsing.BeanDefini
在JBOSS服务器启动期间我收到此错误,

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)

这就是我的application.xml的样子,

<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">

我使用的是弹簧2.5.6 …有关错误的任何建议..

解决方法

这可能是因为您缺少类路径中的spring-tx * .jar文件.您可以验证此文件是否在类路径中.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读