• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Jesus Angeles
Ranch Hand
Posts: 2069
  • 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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!