Announcement Announcement Module
Collapse
No announcement yet.
Lazy loading exception when blazeds serializes a Persistent Object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lazy loading exception when blazeds serializes a Persistent Object

    Hi all,

    i'm having some difficulties loading my objects from the database and send it to flex.

    I have a manyToMany relation between Users and Roles. In my Service call, i'm loading a user in my UserDao, which takes care of the session and the transaction with the hibernateTemplate.

    Also, the fetch type in the ManyToMany relation is set to FetchType.EAGER.

    Now when the userDao returns the user from the db, i can call user.getRoles().size() in the service Class without any problem, although there's no session open anymore.

    As soon as blazeds serializes the User object, i get the lazy loading exception from Hibernate....

    failed to lazily initialize a collection of role:

    ... [BlazeDS]Exception occurred during serialization.


    Anyone knows how this can be solved ?


    Thanks !

  • #2
    moved to data access sub forum: http://forum.springsource.org/showthread.php?t=70640
    Last edited by pulse00; Apr 18th, 2009, 11:56 AM.

    Comment

    Working...
    X