报错如下:INFO ClassPathXmlApplicationContext:412 - Refreshing org.springfra
mework.context.support.ClassPathXmlApplicationContext@13f5d07: display name [org
.springframework.context.support.ClassPathXmlApplicationContext@13f5d07]; startu
p date [Fri Jun 26 14:32:38 CST 2009]; root of context hierarchy
14:32:38,247 INFO XmlBeanDefinitionReader:323 - Loading XML bean definitions fr
om class path resource [beans.xml]
Exception in thread "Thread-0" org.springframework.beans.factory.parsing.BeanDef
initionParsingException: Configuration problem: Unable to locate Spring Namespac
eHandler for XML schema namespace [http://www.springframework.org/schema/tx]
Offending resource: class path resource [beans.xml]
出错时 spring XML 文件 根节点是这样的<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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-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/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">
我修改为 spring1.X的事务处理方式把根节点改为
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
就没事了 完全可以运行 如果在eclipse环境下没问题 Web环境下也没没问题 就是写一个 单击线程程序打成可执行jar文件时运行抱着个错 请问有啥办法解决?
mework.context.support.ClassPathXmlApplicationContext@13f5d07: display name [org
.springframework.context.support.ClassPathXmlApplicationContext@13f5d07]; startu
p date [Fri Jun 26 14:32:38 CST 2009]; root of context hierarchy
14:32:38,247 INFO XmlBeanDefinitionReader:323 - Loading XML bean definitions fr
om class path resource [beans.xml]
Exception in thread "Thread-0" org.springframework.beans.factory.parsing.BeanDef
initionParsingException: Configuration problem: Unable to locate Spring Namespac
eHandler for XML schema namespace [http://www.springframework.org/schema/tx]
Offending resource: class path resource [beans.xml]
出错时 spring XML 文件 根节点是这样的<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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-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/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">
我修改为 spring1.X的事务处理方式把根节点改为
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
就没事了 完全可以运行 如果在eclipse环境下没问题 Web环境下也没没问题 就是写一个 单击线程程序打成可执行jar文件时运行抱着个错 请问有啥办法解决?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货