猿问

web的监听器实例化失败!急求教,正文是错误提示

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 ServletContext resource [/WEB-INF/spring-source.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/LoggerFactory

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/LoggerFactory

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

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

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:190)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:165)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:165)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)

at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:52)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:490)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:366)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:234)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:144)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:321)

at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)

at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)

at java.lang.Thread.run(Thread.java:744)

Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

... 33 more


凭吊影子
浏览 3935回答 1
1回答

hasty

看这个提示:java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory缺少相关的类。
随时随地看视频慕课网APP

相关分类

Java
我要回答