ssh2项目Tomcat启动报错,想了很多办法无果,望高手帮忙,感激!
zk359 2010-01-14 01:48:25 做了配置为何还有错,请求高手帮忙,感谢!
这是配置文件
<!-- 配置sessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
destroy-method="close">
<!-- 配置Hibernate属性 -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MYSQLDialect </prop>
<prop key="hibernate.show_sql">true </prop>
<prop key="hibernate.current_session_context_class">thread </prop>
</props>
</property>
<!--指定数据源 -->
<property name="dataSource" ref="dataSource"> </property>
<!-- 映射文件资源 -->
<property name="mappingResources">
<list>
<value>user/bean/User.hbm.xml </value>
</list>
</property>
</bean>
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="sessionFactory"> </property>
</bean>
<bean id="loginDao" class="user.login.LoginDaoImpl">
<property name="hibernateTemplate" ref="hibernateTemplate"> </property>
</bean>
用的s2s2h3框架和MyEclipse7.5 tomcat6.0
log4j:WARN No appenders could be found for logger (org.springframework.util.Clas
sUtils).
log4j:WARN Please initialize the log4j system properly.
2010-01-14 13:21:33,015 - org.springframework.web.context.ContextLoader -0 [m
ain] INFO org.springframework.web.context.ContextLoader - Root WebApplicationC
ontext: initialization started
2010-01-14 13:21:33,171 - org.springframework.web.context.support.XmlWebApplicat
ionContext -156 [main] INFO org.springframework.web.context.support.XmlWebAppl
icationContext - Refreshing org.springframework.web.context.support.XmlWebAppli
cationContext@120b2da: display name [Root WebApplicationContext]; startup date [
Thu Jan 14 13:21:33 CST 2010]; root of context hierarchy
2010-01-14 13:21:33,296 - org.springframework.beans.factory.xml.XmlBeanDefinitio
nReader -281 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefiniti
onReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/
classes/applicationContext.xml]
2010-01-14 13:21:33,421 - org.springframework.web.context.support.XmlWebApplicat
ionContext -406 [main] INFO org.springframework.web.context.support.XmlWebAppl
icationContext - Bean factory for application context [org.springframework.web.
context.support.XmlWebApplicationContext@120b2da]: org.springframework.beans.fac
tory.support.DefaultListableBeanFactory@b5ad68
2010-01-14 13:21:33,609 - org.springframework.beans.factory.support.DefaultLista
bleBeanFactory -594 [main] INFO org.springframework.beans.factory.support.Defa
ultListableBeanFactory - Pre-instantiating singletons in org.springframework.be
ans.factory.support.DefaultListableBeanFactory@b5ad68: defining beans [dataSourc
e,sessionFactory,hibernateTemplate,loginDao]; root of factory hierarchy
2010-01-14 13:21:33,718 - org.springframework.jdbc.datasource.DriverManagerDataS
ource -703 [main] INFO org.springframework.jdbc.datasource.DriverManagerDataSo
urce - Loaded JDBC driver: com.mysql.jdbc.Driver
2010-01-14 13:21:33,921 - org.hibernate.cfg.Environment -906 [main] INFO org.h
ibernate.cfg.Environment - Hibernate 3.0.5
2010-01-14 13:21:33,921 - org.hibernate.cfg.Environment -906 [main] INFO org.h
ibernate.cfg.Environment - hibernate.properties not found
2010-01-14 13:21:33,921 - org.hibernate.cfg.Environment -906 [main] INFO org.h
ibernate.cfg.Environment - using CGLIB reflection optimizer
2010-01-14 13:21:33,921 - org.hibernate.cfg.Environment -906 [main] INFO org.h
ibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
2010-01-14 13:21:34,078 - org.springframework.beans.factory.support.DefaultLista
bleBeanFactory -1063 [main] INFO org.springframework.beans.factory.support.Defa
ultListableBeanFactory - Destroying singletons in org.springframework.beans.fac
tory.support.DefaultListableBeanFactory@b5ad68: defining beans [dataSource,sessi
onFactory,hibernateTemplate,loginDao]; root of factory hierarchy
2010-01-14 13:21:34,093 - org.springframework.web.context.ContextLoader -1078 [m
ain] ERROR org.springframework.web.context.ContextLoader - Context initializati
on failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/app
licationContext.xml]: Invocation of init method failed; nested exception is java
.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)