1

At first, i am new to stackoverflow and try my best to provide all information to you, that might help you help me solve my problem.

I found some similar questions on this site, but none of them helped me solve my problem.

I'm running a GWT project with GXT. For this i am using Eclipse JavaEE Juno with Maven.

When i just run the application in Eclipse everything is fine, but when i try to build a war using Maven with package as goal i get the following message

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

but it works nevertheless.

I think the problem is that no implementation of the binder could be found. Here is a snippet from my pom.xml

<properties>
    <gwtVersion>2.5.0</gwtVersion>
    <gwt-log.version>3.2.1</gwt-log.version>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <hibernate.version>3.6.9.Final</hibernate.version>
    <gwt-dnd.version>3.2.2</gwt-dnd.version>
    <htmlcleaner.version>2.2</htmlcleaner.version>
    <commons-codec.version>1.7</commons-codec.version>
    <commons-fileupload.version>1.2.2</commons-fileupload.version>
    <gxt.version>3.0.0</gxt.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <slf4jVersion>1.7.5</slf4jVersion>
</properties>
<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.16</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>${slf4jVersion}</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>${slf4jVersion}</version>
</dependency>

These are the ones recommended in the manual (http://www.slf4j.org/manual.html), if i want to use slf4j and log4j

As it only happens, when i build the war, i think it could have to sth. to do with the scope, but i don't know.

Hope you can help me, thanks in advance.

  • "*i get the following message*" > Do you get message during your Maven build process, or once you try and use your WAR file? – Duncan Jones May 15 '13 at 09:18
  • during the build process – Alex Schulze May 15 '13 at 10:41
  • Are you building the WAR file using the in-built Maven packaged with Eclipse? Or are you doing it from the command line with `mvn package`? If it's the former, you may be running into [this problem](http://stackoverflow.com/questions/11916706/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder-error) – Duncan Jones May 15 '13 at 11:49
  • I am building it with the m2e Plugin for Eclipse with the goal `package`. – Alex Schulze May 15 '13 at 11:52
  • I am not able to install software on this computer by myself, but i try to fix it that way. Thx – Alex Schulze May 15 '13 at 11:58
  • It's worth noting that this is an m2e error, not a problem with your project. So one option is just to ignore the warning! – Duncan Jones May 15 '13 at 11:59
  • An external maven was installed and now i don't get this message anymore. – Alex Schulze May 15 '13 at 12:37

1 Answers1

-2

Please use log4j version(1.2.17) instead of (1.2.16) .

for example:

<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.17</version>
</dependency>