org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role

Errror: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role.......

Solution: Add lazy=false in your hbm file where you have declare collection...
Example:
<set name="hhResume" inverse="true" lazy="false">
            <key>
                <column name="UID" not-null="true" />
            </key>
            <one-to-many class="com.example.HhCandidate" />
        </set>

Popular posts from this blog

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Upload file on Google cloud storage using Java servlet on google app engine

Session timeout interceptor in struts 2