org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 23 in XML document from ServletContext resource [/WEB-INF/config/spring/spring-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/mvc/spring-mvc.xsd; lineNumber: 23; columnNumber: 20; cos-all-limited.1.2: An ''all'' model group must appear in a particle with '{'min occurs'}'='{'max occurs'}'=1, and that particle must be part of a pair which constitutes the '{'content type'}' of a complex type definition. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
主要是這個解析錯誤:
java
查了不少資料並無找到答案,我就猜測是否是tomcat自己的問題,就嘗試用MyEclipse自帶的tomcat啓動,結果沒有報錯。這裏確定了,是個人tomcat出問題。spring
我比較我使用的tomcat和myEclipse裏的tomcat,最終發現,我使用的tomcat裏面多了三個jar包;移除這三個jar包,問題解決。spring-mvc
ojdbc14.jar;tomcat
log4j-1.2.17.jar;mvc
xercesImpl-2.0.2.jar;app
我猜測是xercesImpl-2.0.2.jar;致使的,具體緣由,因爲比較晚並無深究,有空研究spa