In my current spring project, when I run the application and open a view with the code below:
Watch your transitive dependencies. By using information from the question and mvn dependency:tree
, this is what I get:
+- org.springframework:spring-context:jar:4.0.3.RELEASE:compile
| +- org.springframework:spring-aop:jar:4.0.3.RELEASE:compile
| +- org.springframework:spring-beans:jar:4.0.3.RELEASE:compile
| +- org.springframework:spring-core:jar:4.0.3.RELEASE:compile
| \- org.springframework:spring-expression:jar:4.0.3.RELEASE:compile
+- org.springframework.security:spring-security-web:jar:3.2.3.RELEASE:compile
| +- aopalliance:aopalliance:jar:1.0:compile
| +- org.springframework.security:spring-security-core:jar:3.2.3.RELEASE:compile
| \- org.springframework:spring-web:jar:3.2.8.RELEASE:compile
+- org.springframework.security:spring-security-config:jar:3.2.3.RELEASE:compile
+- org.springframework.security:spring-security-taglibs:jar:3.2.3.RELEASE:compile
| \- org.springframework.security:spring-security-acl:jar:3.2.3.RELEASE:compile
+- org.springframework.ws:spring-ws-core:jar:2.1.4.RELEASE:compile
| +- org.springframework.ws:spring-xml:jar:2.1.4.RELEASE:compile
| +- org.springframework:spring-oxm:jar:3.2.4.RELEASE:compile
| +- org.springframework:spring-webmvc:jar:3.2.4.RELEASE:compile
| +- wsdl4j:wsdl4j:jar:1.6.1:compile
| +- javax.xml.stream:stax-api:jar:1.0-2:compile
| \- commons-logging:commons-logging:jar:1.1.1:compile
+- org.springframework:spring-orm:jar:4.0.3.RELEASE:compile
| \- org.springframework:spring-jdbc:jar:4.0.3.RELEASE:compile
\- org.springframework:spring-tx:jar:4.0.3.RELEASE:compile
You can see that the older versions of Spring WS and Spring Security pulled some old Spring Framework dependencies as well. I strongly suggest to add <dependencyManagement>
section to your POM and force those dependencies to be 4.0.3:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web/artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
</dependencies>
</dependencyManagement>