一个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环境下会报错
Spring版本不一致导致部署错误
博客介绍了一个web工程在本地测试成功后,使用Maven打包为WAR文件部署到WebLogic服务器时遇到的问题:因Spring版本声明不一致导致的XML解析错误。作者详细解释了如何检查并修正applicationContext.xml中Spring的版本声明。
8261

被折叠的 条评论
为什么被折叠?



