4 Replies Latest reply on Dec 4, 2008 11:17 AM by Nicole Schweighardt

    Failed to Laizy load the Collection

    Edison Mendez Newbie

      Hello everyone,

      I'm using jboss 4.0.5 GA and EJB3 specification with JPA(Java Persistence API). In one persistent entity a have something like this:

      @OneToMany
      private Collection roles;

      But when in my web application (in a Servlet or jsp) i do something like this:

      Collection roles = user.getRoles() (in a servlet)
      or
      ${user.roles} (in a JSP),

      The jboss console displays:

      Laizy Initialization failed in collection of role: org.tha.Role (or something like this)

      I don't know if have something related with entity managers or with the database that i'm using (Mysql 4.1).

      Thanks if you people can help me.