
昨天在做一個SSH的例子時.啟動TOMCAT服務器時就老是報錯.
.........
java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required
根據提示在配置文件中為這個類添加一個property屬性
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
就不會報錯.但是其它的Service類并不需要這么做,讓我感覺很奇怪.最終發現原來是我讓CataogService extends HibernateDaoSupport .改正后運行正常,goood
牢記....
posted on 2007-09-16 16:45
Ke 閱讀(13038)
評論(7) 編輯 收藏 所屬分類:
exception