java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

 

在项目中用到了bonecp连接池,启动tomcat时报异常:java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
具体报错信息如下:
Error creating bean with name 'bonecp' defined in class path resource [config/spring/spring-pool.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
原因:缺少slf4j-api.jar包的缘故
解决方案:在pom.xml中加入依赖的信息
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-api</artifactId>
  <version>1.5.8</version>
</dependency>
 

你可能感兴趣的:(exception,异常,slf4j)