在进行hibernate配置好后运行测试类的时候出现:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)

at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)

at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)

at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)

at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)

at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:255)

at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:165)

at com.lwf.hibernate.UserTest.main(UserTest.java:13)

解决方法:

This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.

You can download SLF4J bindings from the project download page.

大意是org.slf4j.impl.StaticLoggerBinder 无法载入到内存,原因是没有找到合适的绑定SLF4J,需要添加所列举的包中的某一个。

下载地址:  http://www.slf4j.org/dist/slf4j-1.5.2.zip

解压后把  slf4j-nop-1.5.2.jar加入的到项目类库中.

【转载】Failed to load class "org.slf4j.impl.StaticLoggerBinder".问题解决的更多相关文章

  1. Mina 中遇到SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"

    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-op ...

  2. spring quartz 定时任务“Failed to load class "org.slf4j.impl.StaticLoggerBinder”“Checking for available updated version of Quartz”

    Failed to load class "org.slf4j.impl.StaticLoggerBinder 需要slf4j-api.jar.slf4j-log4j12.jar Check ...

  3. eclipse maven SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder

    现象:运行eclipse maven build,console 有红色日志如下: SLF4J: Failed to load class "org.slf4j.impl.StaticLog ...

  4. Kafka生产者案例报警告SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

    一.SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 这个报警告的原因简单来说时因为slf4j的版本 ...

  5. 解执行maven项目出现 SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

    最近再弄maven项目,运行起来没有问题,但是Console控制台会报错,比如说如下的问题异常提示: 由此我们可以看出,报出错误的地方主要是slf4j的jar包,而故障码中“Failed to loa ...

  6. java项目跑起来报错: 程序报 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 错误

    问题: 我用的是ssm框架结合, 利用junit测试的时候抛出 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder& ...

  7. kafka 报Failed to load class "org.slf4j.impl.StaticLoggerBinder".[z]

    转:http://blog.chinaunix.net/uid-25135004-id-4172954.html 测试kafka    producer发送消息 和  consumer 接受消息报错 ...

  8. Failed to load class "org.slf4j.impl.StaticLoggerBinder"

    调试程序出现如下错误: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Default ...

  9. 解决执行maven项目出现 SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. error

    最近再弄maven项目,运行起来没有问题,但是Console控制台会报错,比如说如下的问题异常提示: 由此我们可以看出,报出错误的地方主要是slf4j的jar包,而故障码中“Failed to loa ...

随机推荐

  1. 实现js保留小数点后N位的代码

    在JS中,一般实现保留小数点后N位的话,都是利用toFixed函数 <script language="javascript"> document.write(&quo ...

  2. 改变浏览器页面默认滚动条样式scrollbar

    scrollbar-3d-light-color 设置或检索滚动条亮边框颜色scrollbar-highlight-color 设置或检索滚动条3D界面的亮边(ThreedHighlight)颜色sc ...

  3. webstorm注册码注册

    最近jetbrains公司更新软件总是特别的快,很多私人搭建的server服务也失效了,现出一个能够永久破解的方法,非常简单,只需要2步就完成. 第一步 复制下方activation code,直接粘 ...

  4. pytorch 7 optimizer 优化器 加速训练

    import torch import torch.utils.data as Data import torch.nn.functional as F import matplotlib.pyplo ...

  5. Vue基础知识点

    基础知识: vue的生命周期: beforeCreate/created.beforeMount/mounted.beforeUpdate/updated.beforeDestory/destorye ...

  6. IE9以下版本兼容h5标签

    随着html5(后面用h5代表)标签越来越广泛的使用,IE9以下(IE6-IE8)不识别h5标签的问题让人很是烦恼. 在火狐和chrome之类的浏览器中,遇到不认识的标签,只要给个display:bl ...

  7. Boost Log 基本使用方法

    Boost Log 基本使用方法 flyfish 2014-11-5 依据boost提供的代码演示样例,学习Boost Log 的基本使用方法 前提 boost版本号boost_1_56_0 演示样例 ...

  8. ORA-01733: virtual column not allowed here

    基表: hr.tt  scott.tt  视图1: 基于 hr.tt  union all  scott.tt ---> scott.ttt  视图2: 基于 视图1->scott.ttt ...

  9. IP地址正則表達式

    正則表達式对字符进行格式化匹配.一句指令完毕推断. IP地址格式   x.x.x.x x 表示0~255的数字 分三种情况 A.          250-255:特点:三位数,百位是2,十位是5,个 ...

  10. TCP、HTTP协议的RPC

    TCP.HTTP协议的RPC 1.1 基于TCP协议的RPC 1.1.1 RPC名词解释 RPC的全称是Remote Process Call,即远程过程调用,RPC的实现包括客户端和服务端,即服务调 ...