Привет всем!
Помогите разобраться с получением LazyInitializationException.
В DAO имею метод:
public Town getTownById(Long id){
return (Town) getHibernateTemplate().load(Town.class, id);
}
При попытке вызова даннго метода из контроллера поллучаю LazyInitializationException
public ModelAndView handleRequest(HttpServletRequest
(
Read more... )
public Town getTownById(Long id){
HibernateTemplate ht = getHibernateTemplate();
Object obj = ht.load(Town.class, id);
Hibernate.initialize(obj);
return (Town) obj;
}
Имею следующее:
4.09.2009 16:48:44 org.hibernate.LazyInitializationException SEVERE: could not initialize proxy - no Session ( ... )
Reply
(The comment has been removed)
Reply
(The comment has been removed)
Reply
Leave a comment