Unable to locate Spring NamespaceHandler for XML
2014-12-25 11:39
337 查看
工程在本地Eclipse中运行没任何问题, 打成jar包后启动报错!
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/util]
Offending resource: class path resource [appcontext.xml]
上网一顿搜索
发现有童鞋跟我遇到一样的问题:
http://chenzhou123520.iteye.com/blog/1971322 http://iteches.com/archives/34439
我的Spring配置文件头文件如下:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
然后打好的jar包 META-INF下果然发现spring.handlers和spring.schemas
我将spring.handlers解压出来,打开一看,,里面只有1行
http\://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler
很明显,我的头文件中用了util这玩意,,so,,我在下面加了一行
http\://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
让保存,,替换到jar中..重启,,问题解决!!!
Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/util]
Offending resource: class path resource [appcontext.xml]
上网一顿搜索
发现有童鞋跟我遇到一样的问题:
http://chenzhou123520.iteye.com/blog/1971322 http://iteches.com/archives/34439
我的Spring配置文件头文件如下:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
然后打好的jar包 META-INF下果然发现spring.handlers和spring.schemas
我将spring.handlers解压出来,打开一看,,里面只有1行
http\://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler
很明显,我的头文件中用了util这玩意,,so,,我在下面加了一行
http\://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
让保存,,替换到jar中..重启,,问题解决!!!
相关文章推荐
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://ww
- Unable to locate Spring NamespaceHandler for XML schema namespace
- Unable to locate Spring NamespaceHandler for XML schema namespace异常解决
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- spring 与 CXF 整合 webservice 出现error “Unable to locate Spring NamespaceHandler for XML schema namespace” 总结
- 配置spring-security时报Configuration problem: Unable to locate Spring NamespaceHandler for XML schema
- 解决Unable to locate Spring NamespaceHandler for XML schema namespace
- onfiguration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/security]
- Unable to locate Spring NamespaceHandler for XML schema namespace异常
- transaction 用tx事务 测试时 报错:Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mvc]
- Unable to locate Spring NamespaceHandler for XML schema namespace问题排查
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxws]
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/s
- maven spring-security3 jar包 Configuration problem: Unable to locate Spring NamespaceHandler for XML
- spring报错Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace
- Unable to locate Spring NamespaceHandler for XML schema namespace
- Unable to locate Spring NamespaceHandler for XML schema namespace
- SpringMVC+MyBatis 整合遇到错误 Configuration problem: Unable to locate Spring NamespaceHandler for XML