This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Jesus Angeles
Ranch Hand
Posts: 2070
  • 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: 662
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?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!