开发者

Integrate hibernateTemplate with spring and Jsf

I have an error when I integrate JSF, Hibernate, and Spring. I have created some unit tests, and all of them work. I think that the problem is coming from JSF. I get this error:

failed; nested exc开发者_开发百科eption is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required


It has nothing to do with JSF. You're using Spring's HibernateDaoSupport, and you're not supplying it with either a Hibernate SessionFactory or a Spring HibernateTemplate. You must set one of those properties for a HibernateDaoSupport to work.

Take note that HibernateDaoSupport is considered legacy. If this is new development, you should be using the currently recommended way of using Hibernate from Spring.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜