寫程序遇到的hibernate錯(cuò)誤列表
QueryException: ClassNotFoundException
解決方法:在hibernate.properties上,或是在spring的conext xml中,加上一個(gè)屬性hibernate.query.factory_class,值為org.hibernate.hql.classic.ClassicQueryTranslatorFactory。
解決方法:在hibernate.properties上,或是在spring的conext xml中,加上一個(gè)屬性hibernate.query.factory_class,值為org.hibernate.hql.classic.ClassicQueryTranslatorFactory。
原因:從網(wǎng)上獲知,weblogic.jar中已經(jīng)有了一個(gè)antlr.jar的版本,導(dǎo)致應(yīng)用中hibernate3.jar中用到的antlr.jar不能找到,導(dǎo)致異常。
被這個(gè)問題纏繞了一整天,使我的OA項(xiàng)目毫無進(jìn)展,終于解決了~~
hibernate 查詢對(duì)象為空
沒有主鍵導(dǎo)致的
在數(shù)據(jù)庫對(duì)應(yīng)的表中設(shè)置主鍵。
posted on 2008-11-23 15:05 beyond 閱讀(107) 評(píng)論(0) 編輯 收藏