- 浏览: 403094 次
- 性别:
- 来自: 珠海
文章分类
最新评论
-
一笑_奈何:
什么呀,写的不清不楚的。你是采用的什么监听事件呀
JQuery Mobile列表内容分版面异步加载(一) -
sf2gis:
谢谢,解决了。
搭建struts2,解决Tomcat启动时的错误:严重: Error filterStart -
effort0829:
其实解决办法很简单的,只要架上对应的jar包就可以了。
解决SSH的问题:NoClassDefFoundError: org/aopalliance/aop/Advice -
jianlangood:
受教了,感谢!
解决SSH的问题:NoClassDefFoundError: org/aopalliance/aop/Advice -
jsdsh:
好,太好了.谢谢
Open Chart Flash [ofc]图表示例一 (附图)
下载了hibernate-distribution-3.3.1.GA-dist集成到web工程中,运行tomcat服务器,其中报错:
Failed to load class "org.slf4j.impl.StaticLoggerBinder".
详细信息如下:
===========================================================================>
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2010-11-15 22:41:38 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\MyEclipseWorkspace\misse\WebRoot\WEB-INF\classes\com\liany\misse\misse-spring-global.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
... 31 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:158)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:158)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 44 more
================================================================================
hibernate工程里面使用的是hibernate3.3.1的Lib。
提示信息中多次提到SLF4J,google了一下,才发现这是现在的Hibernate使用SLF4J API记录日志,所以在Hibernate的lib中,不再提供Log4J的包,而大部分框架依然使用Log4J记录日志,这样导致了兼容性问题。
解决办法,两步:
一、在编译路径中添加Log4J的包,比如我一直在用的log4j-1.2.8.jar;
二、再添加一个叫做slf4j-log4j12-1.5.11.jar的包进行转换,注意到这里的log4j12,可能对应的是log4j 1.2版本。
补充:
SLF4J官方下载:http://www.slf4j.org/download.html
下载对应版本后加压找到slf4j-log4j12-XX.jar即可
解决!
解决方法出处来自:http://zhoujingxian.iteye.com/blog/657079
感谢zjx2388!
Failed to load class "org.slf4j.impl.StaticLoggerBinder".
详细信息如下:
===========================================================================>
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2010-11-15 22:41:38 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\MyEclipseWorkspace\misse\WebRoot\WEB-INF\classes\com\liany\misse\misse-spring-global.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
... 31 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:158)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:158)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 44 more
================================================================================
hibernate工程里面使用的是hibernate3.3.1的Lib。
提示信息中多次提到SLF4J,google了一下,才发现这是现在的Hibernate使用SLF4J API记录日志,所以在Hibernate的lib中,不再提供Log4J的包,而大部分框架依然使用Log4J记录日志,这样导致了兼容性问题。
解决办法,两步:
一、在编译路径中添加Log4J的包,比如我一直在用的log4j-1.2.8.jar;
二、再添加一个叫做slf4j-log4j12-1.5.11.jar的包进行转换,注意到这里的log4j12,可能对应的是log4j 1.2版本。
补充:
SLF4J官方下载:http://www.slf4j.org/download.html
下载对应版本后加压找到slf4j-log4j12-XX.jar即可
解决!
解决方法出处来自:http://zhoujingxian.iteye.com/blog/657079
感谢zjx2388!
发表评论
-
理解Struts2的Action中的setter方法是怎么工作的
2012-05-01 22:11 6547接触过webwork和Struts2的同行都应该知道, ... -
解决SSH的问题:NoClassDefFoundError: org/aopalliance/aop/Advice
2012-04-30 13:54 27583在集成Struts2+Spring3+Hibern ... -
搭建struts2,解决Tomcat启动时的错误:严重: Error filterStart
2012-04-28 15:11 69041. 环境: JDK: jd ... -
Hibernate主键ID自动生成两种方法示例
2012-03-03 16:13 2877版本:hibernate-3.2.7 方法之一: 用uuid生 ... -
一个由hbm.xml文件格式不正确引发的悲催
2012-02-02 10:07 6136项目中运用了Hibernate3,报错如下: INFO ... -
Hibernate(HQL) 怪异的count()函数
2012-01-06 11:31 3764近日发现HQL中, count()函数要求还比较严格,举例说: ... -
基于SSH框架开发的JSP页面优化总结
2011-12-23 09:32 2185webwork2是struts2的前生,虽然struts ... -
webwork2使用细节
2011-11-15 10:49 1195记录一下webwork2使用细节,这些细节虽是小问题,可是不注 ... -
Hibernate(HQL) 子查询 formula公式运用
2011-11-02 17:07 2253写HQL时,除了where条件里可以用子查询,其它地方,如se ... -
Hql技巧积累之二:hbm.xml文件中经常犯的错
2011-05-15 15:16 2569Hibernate使用了*.hbm.xml来进行数据库表与ja ... -
Hql技巧积累之一:同时使用distinct和order by的问题
2010-12-20 11:22 5498所用数据库:ms server2000 所用hibernate ... -
Tomcat Server启动时报错: 请使用支持 JDBC 4.0 的 sqljdbc4.jar 类库
2010-11-19 00:11 5082以前一直做连接Oracle数据库的web项目, 今晚尝试搭建连 ... -
SQL 删除操作的语法在Hql中报错
2010-11-17 11:51 1550Hql中不能使用下面的删除语法, 但对应sql的语法是正确的。 ... -
Hibernate one-to-many映射要注意的问题及详细例子
2010-11-01 09:08 1819使用场合: table1中主键id被table2作为外键引用, ... -
SSH jar包冲突解决方法 - (struts2 spring2 hibernate3)
2010-08-29 11:20 4113SSH jar包冲突解决方法 - (struts2 sprin ...
相关推荐
总之,解决"SLF4J: Failed to load class "org.slf"错误的关键在于正确配置和管理项目的依赖,确保SLF4J能找到并使用一个有效的日志实现。通过上述步骤,你应该能够成功解决这个问题,并确保日志功能正常工作。
hibernate的错误SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".的解决方法是:下载slf4j-nop.jar、slf4f-simple.jar、slf4j-log4j12.jar、slf4j-jdk14.jar或logback-classic.jar中某一个而且...
用于Failed to load class "org.slf4j.impl.StaticLoggerBinder"问题的jar包
解决Failed to load class "org.slf4j.impl.StaticLoggerBinder" 所需要的jar包:slf4j-log4j12-1.7.5.jar
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...
Tomcat + SLF4J +登录 Tomcat SLF4J Logback是tomcat的替代产品,它允许所有内部日志记录全部使用我们喜欢的slf4j / logback库。 注意 从logback 1.1.7开始,不再需要在server.xml中包含${catalina.home}来进行...
当你遇到“SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder”这样的错误时,通常意味着你的应用程序在运行时未能找到合适的SLF4J实现。StaticLoggerBinder是SLF4J用来绑定具体日志框架的关键类,...
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#StaticLoggerBind
运行.jar文件例如java -jar compendium-of-test-apps-v1-1.jar 服务器应该会启动,您会看到如下内容: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP)...
- **具体表现**:在日志输出时,可能会看到类似“Failed to load class 'org.slf4j.impl.StaticLoggerBinder'”的警告信息。 - **原因分析**:这表明SLF4J(Simple Logging Facade for Java)未能找到一个合适的日志...
如果系统报错`Failed to load class org.slf4j.impl.StaticLoggerBinder`,这意味着没有找到合适的SLF4J绑定。SLF4J(Simple Logging Facade for Java)是一个日志门面,需要与特定的日志实现(如log4j、logback)...
例如,SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"。这种错误是因为没有找到合适的绑定SLF4J,无法载入到内存。解决的办法是下载新的合适的slf4j-nop.jar。 基本操作练习 在解决完错误后,...
1. <span Failed to load class "org.slf4j.impl.StaticLoggerBinder". 2. SLF4J: Defaulting to no-operation (NOP) logger implementation 3. SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder ...