This problem was mentioned in several sources on the Internet, but I could not solve it using the solutions provided there.
PROBLEM: The following error is issued from log4j when mvn gwt: run is released :
[ERROR] log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.
[ERROR] log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
[ERROR] log4j:ERROR [sun.misc.Launcher$AppClassLoader@23137792] whereas object of type
[ERROR] log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [WebAppClassLoader=Demo@3d1665ac].
[ERROR] log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
DESCRIPTION OF MY PROJECT: I use the default touchdown server provided with gwt and run it in an explosive war.
<gwt.version>2.6.1</gwt.version>
<spring.version>3.2.6.RELEASE</spring.version>
<log4j.version>1.2.17</log4j.version>
<slf4j.version>1.7.5</slf4j.version>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>
What more, I exclude commons-logging from spring and other projects that depend on it.
( ) :
, WEB-INF/lib log4j, slf4j-api, slf4j-log4j12 jcl-over-slf4j, , jcl-over-slf4 (.. ).
jcl-overl-slf4j maven (. ), lib, . . lib, , . maven-dependency-plugin , lib maven.
, , , - log4j, slf4j-api, slf4j-log4j12, jcl-over-slf4j - gwt spring.
, jcl-over-slf4j maven?