Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[hibernate, spring] How to use 'Hibernate.initialize()'

 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I used it as below, but getting an exception when the 'initialize()' method is called (pasted below). Where should I do this 'initialize()'?





What I am thinking is, I should use HibernateTemplate instead of HibernateDaoSupport, because I need to do the initialize().

I will appreciate your ideas.
 
Arun Kumarr
Ranch Hand
Posts: 661
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the bean definition of "TestProductHibernateImpl" in your spring config file?
We need to inject the sessionFactory.
Just check if you've done it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic