java.lang.ClassNotFoundException: org.slf4j.LoggerFactory异常处理

来源:互联网 发布:金山软件框架 编辑:程序博客网 时间:2024/06/10 00:11

当启动tomcat后,在控制台出现如下提示:

org.springframework.beans.factory.BeanCreationException: 

Error creating bean with name 'sessionFactory' defined in ServletContext resource 

[/WEB-INF/hib-config.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: 

Could not instantiate bean class [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean]: Constructor threw exception; 

nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory


这种情况,一般是在lib包下缺少两个jar文件,这两个jar文件是:slf4j-api-1.5.0和slf4j-log4j12-1.5.0,他们的位置在:

spring-framework-2.5.6\lib\slf4j文件夹下。

0 0
原创粉丝点击