小錯誤收集

 
a.lang.NoClassDefFoundError: net/sf/hibernate/cfg/Configuration

很簡單net/sf/hibernate/cfg/Configuration這個找不到

你看下你hibernate的版本, 新版本是org/hibernate開始的,
舊的纔是net.sf

***************************************************

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseDao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/hibernate/Session java.lang.NoClassDefFoundError: net/sf/hibernate/Session

錯誤原因:

Hibernate3使用Spring Hibernate2 HibernateDaoSupport 的版本 繼承錯誤了

import org.springframework.orm.hibernate.support.HibernateDaoSupport;

該爲

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

**************************************************************

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章