Hi
Please show complete stack trace of exception
On Wed, May 5, 2010 at 6:41 PM, <[email protected]> wrote:
>
> hi i want to load the lazy collection. but the transaction seems to be
> closed already.
>
> anny ideas??
>
> i have this:
>
> public User getFullUserByUsername(String username) throws
> UsernameNotFoundException {
> List users = getHibernateTemplate().find("from User where
> username=?", username);
> if (users == null || users.isEmpty()) {
>
> throw new UsernameNotFoundException("user '" + username + "' not
> found...");
> } else {
> User user = (User) users.get(0);
> log.debug("load lazy collection");
> user.getPasswordHistory().size(); //<<<< lazy loading exception
> return user;
> }
>
> thanks
>
> tibi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>