1 Reply Latest reply on Jan 27, 2006 7:33 PM by Stefan Liebner

    LazyInitializationException with SeamExtendedManagedPersiste

    Stefan Liebner Newbie


      I still get the dreaded LazyInitializationException although I'm using the SeamExtendedManagedPersistencePhaseListener.

      My entity manager is bound to the jndi context, I can query an EJB3 entity with it, but when I try to navigate down a OneToMany relationship I get

      [LazyInitializationException] failed to lazily initialize a collection of role: ..., no session or session was closed

      My setting is similar to your generated code:

      From a JSF List page I call a SFSB (List Bean) method which is annoted with @Begin and delegates handling to another SFSB (Editor/Show Bean). The rendering JSF View then asks for the Set with the many end of the relation. The getter is annoted as a @DataModel.

      But from that method I get the error mentioned above.

      What could be wrong?