I am retrieving the certain data from table using key.
I am using hibernate query to retrieve the data.
I am able to retrieve the data for particular key . But for some other keys i am getting error or exceptions. the exception i am getting is
[1/17/13 14:07:41:819 IST] 0000004c LongType I **org.hibernate.type.NullableType nullSafeGet could not read column value from result set: BRAND1_23_2_; [jcc][t4][10120][10898][3.58.81] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null**
[1/17/13 14:07:41:822 IST] 0000004c JDBCException W org.hibernate.util.JDBCExceptionReporter logExceptions SQL Error: -4470, SQLState: null
[1/17/13 14:07:41:823 IST] 0000004c JDBCException E org.hibernate.util.JDBCExceptionReporter logExceptions [jcc][t4][10120][10898][3.58.81] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
[1/17/13 14:07:41:826 IST] 0000004c DefaultLoadEv I org.hibernate.event.def.DefaultLoadEventListener onLoad Error performing load command
org.hibernate.exception.GenericJDBCException: could not load an entity: [com.travelport.soa.gds.airline.brandedfares.entity.FareCollection#490]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
You fetched an entity that has a one-to-many relationship represented in Java as a lazy-loaded
Collectionand you are trying to iterate over that collection after you have already closed the Hibernate session within which you have fetched the object. You must either fetch the collection eagerly or widen the session boundaries to enclose your iteration code.