Appfuse “failed to lazily initialize a collection of role”

If you are getting a failed to lazily initialize a collection of role error in AppFuse , you need to un-comment the lazyLoadingFilter filter and associated filter-mapping in src/main/webapp/WEB-INF/web.xml .

<filter>
    <filter-name>lazyLoadingFilter</filter-name>
    <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>lazyLoadingFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>



4 Responses to “Appfuse “failed to lazily initialize a collection of role””  

  1. 1 Tim

    Hey, thanks for this. I wasted about an hour until i found your post. good looking out

  2. 2 dave

    No probs, glad it was helpful to someone – I wasted a good hour trying to figure it out myself :)

  3. 3 Shurman

    Thanks, your suggestion save my time, I spend 5 minutes on google to get your info.

  4. 4 alfr3do

    Many Thanks!!!, this is a great help for me!, Saludos desde La Paz – Bolivia

Leave a Reply