SAXParseException:cvc-elt.1:找不到元素“beans”的声明

来源:互联网 发布:下载放大镜软件 编辑:程序博客网 时间:2024/06/01 08:17

一个web工程本地测试通过,maven一个war包放到weblogic下报错,


SAXParseException:cvc-elt.1:找不到元素“beans”的声明 

百度了一下不太明白,然后查看自己的applicationContext.xml,发现spring的版本写错了,


http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd


其实我的spring包是 3.0的,把这段改了就好了,


http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd

重新打包war,测试通过,但是有点疑问就是本地测试的时候没有报错,扔Linux 和aix环境下会报错

0 0
原创粉丝点击