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

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

Upload csv file at Google Cloud Storage using java

Read Images from a xlsx file using Apache POI