用maven建立了一個工程,還沒來得及編碼,剛部署到tomcat下就發現報異常,但是又不很完整,于是又把log4j.jar及commmons-logging.jar還有log4j.properties放入tomcat的lib目錄下,
log4j内容:
重新開機後終于看到詳細異常資訊:
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected excep
tion parsing XML document from class path resource [applicationContext-mvc.xml];
nested exception is java.lang.IllegalStateException: Unable to load schema mapp
ings from location [META-INF/spring.schemas]
經排查,是spring-jdbc-3.0.6.RELEASE.jar出現了問題,點選spring-schemas時出現了 :invalid LOC header,可能是maven下載下傳過程中出現了不完全下載下傳?(按理說也不應該啊,真是詭異)
于是把mvn_repository下spring-jdbc的包删除,重新build後maven重新下載下傳jar,問題解決。