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)
...全文
153 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
zl3450341 2010-01-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 warison2008 的回复:]
.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext        at org.springframework.beans.factory.support.AbstractAutowireCapableBean ?缺少hibernate-core.jar
[/Quote]

。。LZjar包导全了没有?
既然用的MyEclipse 就全部导入啊
导入之后在删掉冲突的包
fengye_nothing 2010-01-14
  • 打赏
  • 举报
回复
少了Spring的JAR包
TzSword 2010-01-14
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 tzsword 的回复:]
引用 6 楼 crazylaa 的回复:
引用 1 楼 warison2008 的回复:
.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext        at org.springframework.beans.factory.support.AbstractAutowireCapableBean ?缺少hibernate-core.jar


  有在无字天书的感觉。。。。。。。。。。。
[/Quote]
有种无字天书。。。。。
TzSword 2010-01-14
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 crazylaa 的回复:]
引用 1 楼 warison2008 的回复:
.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext        at org.springframework.beans.factory.support.AbstractAutowireCapableBean ?缺少hibernate-core.jar

[/Quote]
有在无字天书的感觉。。。。。。。。。。。
crazylaa 2010-01-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 warison2008 的回复:]
.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext        at org.springframework.beans.factory.support.AbstractAutowireCapableBean ?缺少hibernate-core.jar
[/Quote]。
wanglf1207 2010-01-14
  • 打赏
  • 举报
回复
[Quote=引用楼主 zk359 的回复:]
做了配置为何还有错,请求高手帮忙,感谢!
这是配置文件
<!-- 配置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)
[/Quote]

你太棒了,我稀罕你
C_sdnElf 2010-01-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 warison2008 的回复:]
.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext        at org.springframework.beans.factory.support.AbstractAutowireCapableBean ?缺少hibernate-core.jar
[/Quote]

up
牛叔 2010-01-14
  • 打赏
  • 举报
回复
你重新把框架搭建过一次
用myEclipse很快的
牛叔 2010-01-14
  • 打赏
  • 举报
回复
你发了两个贴
一个贴送分的啊?
道光2008 2010-01-14
  • 打赏
  • 举报
回复
.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext at org.springframework.beans.factory.support.AbstractAutowireCapableBean ?缺少hibernate-core.jar

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧