Why does using spring 3.0 and struts yield: HTTP Status 404 - Servlet action is not available - spring

Using Spring and Struts together gives no error
message in the console, but only a:
HTTP Status 404 - Servlet action is not available
in the Browser.
The logs give no clue whatsoever.

When Struts' action servlet fails to startup for whatever reason,
the resulting error can be as above.
In my case - struts using springs spring-struts integration -
the necessary spring jars (esp. spring-struts) were missing from the
class path of my web application.
The following maven dependencies worked:
<properties>
<spring.maven.artifact.version>
3.0.3.RELEASE
</spring.maven.artifact.version>
<spring.security.maven.artifact.version>
3.0.3.RELEASE
</spring.security.maven.artifact.version>
</properties>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-struts</artifactId>
<version>${spring.maven.artifact.version}</version>
<exclusions>
<exclusion>
<groupId>struts</groupId>
<artifactId>struts</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.security.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${spring.maven.artifact.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>com.springsource.org.apache.commons.codec</artifactId>
<version>1.4.0</version>
</dependency>
<!-- Struts 1.3 framework -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-el</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-extras</artifactId>
<version>1.3.10</version>
</dependency>
<!-- be sure to include extra struts modules, as needed,
especially for used struts-plugins -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-tiles</artifactId>
<version>1.3.10</version>
</dependency>
Note: if you don't use spring-security you can very likely drop the spring-security related dependencies, also the exclusion in spring-struts was necessary to include the latest struts version instead of 1.2.9

Related

Spring security + RestEasy dont deploy builds well deploys to REFLECTION

hey guys I have created a maven project with resteasy lib and I test it and work well called by simple java main project, but I have alot problems to integrate this project with a war project because I have always this kind of error
full log error https://pastebin.com/iKNHXJbp
[org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter]:
Constructor threw exception; nested exception is java.lang.NoSuchFieldError: REFLECTION
I suspect is a problem with this library com.sun.xml.bind.v2.model.impl. but if someoe can helpme with tips, thanks in advance..
the envioroment
- EAP7.1
- springsecurity
- resteasy
the structure of the situacion
my new resteasy project is used by a custom project, that project is a customcomponent for primefaces, and the custom component is used by the final war project.
DEPENDENCIES
war project dependencies
<dependencyManagement>
<dependencies>
<!-- DEPENDECIAS INTERNAS -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<!-- DEPENDENCIAS INTERNAS -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.2.8</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>5.6.1</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>5.6.1</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-client -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.19.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- DEPENDENCIAS SPRING -->
<!-- Spring Web MVC -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- Spring security core, web, config, aspects, taglibs -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${springsec.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${springsec.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${springsec.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-aspects</artifactId>
<version>${springsec.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${springsec.version}</version>
</dependency>
<!-- Spring Core, Context, Support, beans, test, Web MVC -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ebaysf.web</groupId>
<artifactId>cors-filter</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>custom.jasperserver.api</groupId>
<artifactId>mirecarga-jasper</artifactId>
<version>7.1.0</version>
</dependency>
<dependency>
<groupId>custom.component.primefaces</groupId>
<artifactId>project-customComponentPrimefaces</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
This looks very much like a version mismatch. Are you sure that all of your Spring jars are the same version?
Do you use Maven or Gradle? Is there a chance it is picking up an older version transitively?

Adding Jdbc sessions to spring boot

When we add the JdbcSession to spring boot project , does it store the session directly in the database(I mean the relational database) . My assumption is If someone restarts the tomcat it should load all the sessions which were stored in the database.
I have added the following dependencies in the pom.xml , however I am not able to
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-jdbc</artifactId>
<version>1.2.0.RELEASE</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.2.5.RELEASE</version>
</dependency>
Still I do not get the #EnableJdbcJdbcHttpSession in eclipse.Is there any standard example currently I am referring to http://docs.spring.io/spring-session/docs/current/reference/html5/guides/httpsession-jdbc.html#httpsession-jdbc-sample
I have not included the redis session in pom.xml but still I see session.redis when I do import in the eclipse.
Update 1 :
My dependencies are like given below :
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<!-- <version>4.2.3.RELEASE</version> -->
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-jdbc</artifactId>
<version>1.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>4.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.9</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>4.0.3.RELEASE</version>
</dependency>
</dependencies>
Had struggled with this for a long time and found the solution:
The default version of spring-session used by spring framework 1.3.5.RELEASE is 1.0.2.RELEASE, which does not contain the #EnableJdbcHttpSession definition.
Solved this by:
Adding the session jar into the pom (make sure it uses the 1.2.0.RELEASE version):
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<version>1.2.0.RELEASE</version>
</dependency>

Is it possible to integate spring, Hibernate and Restful using Maven?

I need to build a Restful web-service using spring and hibernate? I want to use Spring 4.2.2 and Spring security 4.0.3 and hibernate 4.3.0 Is there anybody who have already used this integration. And I am looking for a appropriate POM.xml , I am comparatively new, so any help will be appreciated.
Your pom.xml really depends on what you are doing, but this subsection of a typical pom should get you going (showing how to use properties). You will need to add further dependencies as required (or remove those not required), and change the hiberate version:
<properties>
<!-- Spring -->
<!-- NOTE Spring-security 4.0.3 is tied to core version 4.2.2; don't change one without the other!! -->
<spring.version>4.2.2.RELEASE</spring.version>
<spring-security.version>4.0.3.RELEASE</spring-security.version>
<!-- persistence -->
<hibernate.version>4.2.13.Final</hibernate.version>
</properties>
<dependencies>
<!-- Spring Security Modules -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring-security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
</dependencies>

spring security jar files are not being downloaded by maven

The spring security jar files are missing from my project classpath.
Maven clean and install execute successfully but doesn't download jar files for spring-security which I have mentioned in my pom.xml(see below).All other jar files are being downloaded successfully.
below is the dependencies for for my project - POM.xml
<version.org.springframework>3.2.4.RELEASE</version.org.springframework>
<version.org.springframework.security>3.2.4.RELEASE</version.org.springframework.security>
<!-- Spring framework dependency management -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${version.org.springframework}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>4.0.5.RELEASE</version>
</dependency>
<!-- Spring security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${version.org.springframework.security}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${version.org.springframework.security}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${version.org.springframework.security}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-acl</artifactId>
<version>${version.org.springframework.security}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>${version.org.springframework.security}</version>
</dependency>
<!-- Spring MVC -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${version.org.springframework}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${version.org.springframework}</version>
</dependency>
Your variable is not resolved. Did you initialize it properly?
As you can see here
http://repo.maven.apache.org/maven2/.error=Could not transfer artifact org.springframework.security:spring-security-web:pom:${spring.version} from/to central (http://repo.maven.apache.org/maven2): Illegal character in path at index 86: http://repo.maven.apache.org/maven2/org/springframework/security/spring-security-web/${spring.version}/spring-security-web-${spring.version}.pom
Initialize $spring-version
Delete those files, which contains ${spring.version}, and fix your pom.xml:
<properties>
<version.org.springframework>3.2.4.RELEASE</version.org.springframework>
<version.org.springframework.security>3.2.4.RELEASE</version.org.springframework.security>
</properties>
Also wrap your <dependency> tags with a <dependencies> tag.
If it's a root pom, you should use a <dependencyManagement> tag.

Error while deploying through hudson in tomcat

I have a maven project which runs flawlessly on my local environment. But when I deploy it over our DEV environment, it gives out the following error while deploying and stops any further deployment steps and the server just goes up.
log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.
log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
log4j:ERROR [org.apache.catalina.loader.StandardClassLoader#19968e23] whereas object of type
log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [WebappClassLoader
context: /cloud
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader#19968e23
].
log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
log4j:WARN No appenders could be found for logger (com.att.security.web.servlet.filters.CSPCookieFilter).
log4j:WARN Please initialize the log4j system properly.
I see this in the catalina logs when the while deploying. The deployment is always a success but the application does not work properly. It started occurring when I upgraded my application from spring 3.2.0 to 3.2.7 as I wanted to use the JPA 2.1 specification and call a procedure directly.
As a workaround, I have to wipe out the workspace and re-deploy the build via hudson and then manually restart the tomcat 7.0.52 server for the application to work properly. In that case also, the error comes but the application works fine.
My POM looks like this:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javax.version>3.0.1</javax.version>
<org.springframework.version>3.2.7.RELEASE</org.springframework.version>
<hibernate.version>4.3.4.Final</hibernate.version>
<tiles.version>2.2.2</tiles.version>
<org.slf4j-version>1.7.5</org.slf4j-version>
<ehcache.version>2.8.0</ehcache.version>
<apache.poi-version>3.9</apache.poi-version>
<junit-version>4.8.1</junit-version>
<mockito-version>1.8.5</mockito-version>
</properties>
<!-- utilities to convert java objects to JSON objects -->
<dependencies>
<!-- Java Servlet APIs -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.version}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.12</version>
</dependency>
<!-- JSTL Support -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Spring Libraries -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.6.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>${tiles.version}</version>
<exclusions>
<exclusion>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>${tiles.version}</version>
</dependency>
<!-- Java Mail API -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>
<!-- Support for logger used by spring frameworks -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>${ehcache.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.parsers</groupId>
<artifactId>jaxp-ri</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${apache.poi-version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${apache.poi-version}</version>
</dependency>
</dependencies>
Recent changes I have done to my application:
1. Including the Javamail API dependency
2. Upgrading the spring-jpa-data dependecy to 1.6.0 from 1.3.4
3. Upgrading the spring base version to 3.2.7 from 3.2.0
I searched the web but did not find something working for me. Please guide. The application will be going to PROD in a week and I don't want to stick with my workaround.
Any help is pre-appreciated as I don't have the reputation to do the same after posting the question :)
You must have placed log4j.jar in both Tomcat libs and your web application libs. You have to chose and keep one of them.

Resources