我最近升级到spring-core 4.0.5并确保所有其他Spring组件都是兼容版本。我没有升级的唯一东西是spring-ldap-1.3.1和spring-security-3.1.2。
在我将WAR部署到Tomcat服务器之后,我在Tomcat控制台上看到了一些消息,其中包含" Spring Major版本' 3'预期,但您运行的版本:4.0.5.RELEASE。请检查您的类路径中是否有不需要的jar文件。"。但没有例外或任何事情,服务器成功启动,应用程序似乎工作正常。
Listening for transport dt_socket at address: 8889
Mar 26, 2015 6:08:39 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5.1.
Mar 26, 2015 6:08:39 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters false], random [true].
Mar 26, 2015 6:08:40 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized with version OpenSSL 1.0.1j 15 Oct 2014
Mar 26, 2015 6:08:40 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8888
Mar 26, 2015 6:08:40 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Mar 26, 2015 6:08:40 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1142 ms
Mar 26, 2015 6:08:40 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 26, 2015 6:08:40 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.43
Mar 26, 2015 6:08:40 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Mar 26, 2015 6:08:41 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Mar 26, 2015 6:08:41 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive my-application-ui.war
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
Mar 26, 2015 6:08:42 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive my-application-web-service.war
**-*** Spring Major version '3' expected, but you are running with version: 4.0.5.RELEASE. Please check your classpath for unwanted jar files.**
-Root WebApplicationContext: initialization completed in 39254 ms
我去了WEB-INF \ lib并看到了Spring罐子如下。
spring-aop-4.0.5.RELEASE.jar
spring-beans-4.0.5.RELEASE.jar
spring-context-4.0.5.RELEASE.jar
spring-context-support-4.0.5.RELEASE.jar
spring-core-4.0.5.RELEASE.jar
spring-expression-4.0.5.RELEASE.jar
spring-jdbc-4.0.5.RELEASE.jar
spring-jms-4.0.5.RELEASE.jar
spring-orm-4.0.5.RELEASE.jar
spring-oxm-4.0.5.RELEASE.jar
spring-tx-4.0.5.RELEASE.jar
spring-web-4.0.5.RELEASE.jar
spring-webmvc-4.0.5.RELEASE.jar
spring-ws-core-2.2.0.RELEASE.jar
spring-ws-security-2.2.0.RELEASE.jar
spring-ws-support-2.2.0.RELEASE.jar
spring-xml-2.2.0.RELEASE.jar
spring-ldap-1.3.1.RELEASE-all.jar
spring-ldap-core-1.3.1.RELEASE.jar
spring-security-config-3.1.2.RELEASE.jar
spring-security-core-3.1.2.RELEASE.jar
spring-security-ldap-3.1.2.RELEASE.jar
spring-security-web-3.1.2.RELEASE.jar
我无法弄清楚此消息的来源以及原因。非常感谢任何帮助。