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>

Comments

Popular posts from this blog

Read Images from a xlsx file using Apache POI

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'

How to create mail message in FRC822 format