I have developed Spring MVC app with 3.1.1 Framework Version, now I want to switch to 4.0.1.
I am using Maven to handle all the dependencies.So when I change the version in pom.xml
, I get compilation error JavaMailSenderImpl
could not be resolved to type.
Also I am not able to locate package org.springframework.mail.javamail.JavaMailSenderImpl
in the jars.But from docs it looks like this package is not removed in latest version.
I tried cleaning the project & building again but didn't helped me.
So any idea what am I doing wrong here?
This is the URL to docs
Below is part of pom.xml
-
<properties>
<hibernate.version>4.1.3.Final</hibernate.version>
<spring.version>4.0.1.RELEASE</spring.version>
<spring.security.core.version>3.1.1.RELEASE</spring.security.core.version>
<spring.security.version>3.1.1.RELEASE</spring.security.version>
<google-guava.version>12.0</google-guava.version>
<joda-time.version>2.1</joda-time.version>
<slf4j.version>1.6.4</slf4j.version>
<h2.version>1.3.167</h2.version>
<jasper.version>4.7.0</jasper.version>
<commons.digester.version>2.1</commons.digester.version>
<commons.collections.version>3.2.1</commons.collections.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.security.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.security.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${spring.security.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.security.core.version}</version>
</dependency>
<!-- Java Mail Dependency -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
</project>
It was dependency, I was missing.So I added following dependency -
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.0.1.RELEASE</version>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With