Exception:Unable to locate Spring NamespaceHandler for XML schema namespace

oppo 2011-09-13 11:12:38
问题完整描述
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:
Unable to locate Spring NamespaceHandler for XML schema namespac[http://www.springframework.org/schema/context]

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans
/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/context http://www.springframework.org/schema/context/spring-context
-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
">
<!-- 本注解无法打开 -->
<context:annotation-config />

望高人指点,尝试过各种搜索引擎去搜索解决办法。
...全文
5426 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
eddie 2014-03-20
  • 打赏
  • 举报
回复
引用 1 楼 bijanen19861113 的回复:
这个应该是jar和你在spring的配置文件中的声明不匹配导致的。 xmlns:context="http://www.springframework.org/schema/context"
应该有还是不应该有啊?
wanmeianan 2013-09-25
  • 打赏
  • 举报
回复
引用 2 楼 EverWHL 的回复:
如果遇到这个问题,就要注意看你的jar包中的META-INF目录下是不是有这两个文件:spring-handlers及spring-schemas!
有啊。但是spring.schemas文件里面有很多重复的jar,如: http\://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd http\://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd http\://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd
bijanen19861113 2011-09-13
  • 打赏
  • 举报
回复
这个应该是jar和你在spring的配置文件中的声明不匹配导致的。
xmlns:context="http://www.springframework.org/schema/context"
EverWHL 2011-09-13
  • 打赏
  • 举报
回复
如果遇到这个问题,就要注意看你的jar包中的META-INF目录下是不是有这两个文件:spring-handlers及spring-schemas!

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧