请教:Failed to load class "org.slf4j.impl.StaticLoggerBinder"

开发工具是myeclipse2013,maven3.0.5,jdk1.7,在eclipse2013中创建了一个maven web 项目,在进行maven build 的时候报错如下:

[DEBUG] -- end configuration --

[INFO] Deploying war to http://localhost:8080/my-web-app  
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.
Uploading: http://localhost:8080/manager/text/deploy?path=%2Fmy-web-app&update=true


我的pom.mxl文件如下:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>gyxtest.test.app</groupId>
  <artifactId>my-web-app</artifactId>
  <packaging>war</packaging>
  <version>y</version>
  <name>my-web-app Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
       <dependency>    
    <groupId>org.slf4j</groupId>
   <artifactId>slf4j-api</artifactId>
   <version>1.7.5</version>  
    </dependency>   
     <dependency>    
    <groupId>org.slf4j</groupId>
   <artifactId>slf4j-log4j12</artifactId>
   <version>1.7.5</version>
    </dependency>
 
    <dependency>  
      <groupId>log4j</groupId>  
      <artifactId>log4j</artifactId>  
      <version>1.2.14</version>  
      <scope>compile</scope>  
    </dependency>  


  </dependencies>
  <build>
    <finalName>my-web-app</finalName>
    <pluginManagement>
    
      <plugins>
     <plugin>  
           <groupId>org.apache.tomcat.maven</groupId>  
           <artifactId>tomcat7-maven-plugin</artifactId>  
           <version>2.1</version>  
           <configuration>  
               <url>http://localhost:8080/manager/text</url>   
               <server>tomcatd</server>
               <path>/my-web-app</path>  
           </configuration>  
       </plugin> 
       <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<copy todir="D:\webserver\apache-tomcat-7.0.39\webapps" file="*.*"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
    </plugin>
    <!--conguration Jetty-->
       <plugin>
        <groupId>org.mortbay.jetty</groupId>   
        <artifactId>maven-jetty-plugin</artifactId>
       </plugin>
      </plugins>
    </pluginManagement>


  </build>
</project>


且 在 .m2/repository 中已经有了对应的slf4j-log4j12-1.7.5.jar, slf4j-api-1.7.5.jar 文件,

看http://www.slf4j.org/codes.html#StaticLoggerBinder 这个中的内容好像是 有slf4j-log4j12-1.7.5.jar 应该就可以了,而且这个jar包中已经有了org.slf4j.impl.StaticLoggerBinder 这个类了。

在网上搜了很多关于这个的资料,基本上都是把slf4j-log4j12-1.7.5.jar这个放到类路径里就可以了,我的maven仓库里也已经有了这个jar包了,怎么还是报错呢,请问这个slf4j-log4j12-1.7.5.jar 应该放哪里啊?


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值