GenericJDBCException: Could not execute query

Description

Basically the flow is like
Search page
Listing page
Details pages - with pagination which displays the next & previousand also with a refresh.

Lookup records are used for details page,
from the 1st details page

  • if navigated using next or previous (record details) or refresh for more then 2 + times the error occurs::

for getting this lookup a new Session serves for every request.

net.sf.hibernate.exception.GenericJDBCException: Could not execute query/list

code::
Query query = session.createQuery("from LookupsDTO l order by l.lookupsPK.codeGroup, l.m_seq");
List lookups = query.list();

LOOKUP mapping ::

<class name="LookupsDTO" table="LOOKUPS" dynamic-insert="true">
<composite-id name="lookupsPK" class="com.freightliner.mdi.dto.pk.LookupsPK">
<key-property name="codeGroup" column="CODE_GROUP" type="string"/>
<key-property name="code" column="CODE" type="string"/>
</composite-id>

<version name="hibVers" column="HIB_VERS" type="integer"/>
<property name="m_description" column="DESCRIPTION" type="string" access="field" />
<property name="m_seq" column="SEQ" type="integer" access="field" />
<property name="m_default" column="DEFAULT" type="character" access="field" />
<property name="m_userId" column="USER_ID" type="string" access="field" />
<property name="m_updateDateTs" column="UPDATE_DATE_TS" type="timestamp" access="field" />
</class>

Error::
JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: 0, SQLState: null
[10/11/05 11:59:00:125 PDT] 54e8c411 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter DSRA9110E: Connection is closed.
[10/11/05 11:59:00:125 PDT] 54e8c411 JDBCException W net.sf.hibernate.util.JDBCExceptionReporter SQL Error: 0, SQLState: null
[10/11/05 11:59:00:141 PDT] 54e8c411 JDBCException E net.sf.hibernate.util.JDBCExceptionReporter DSRA9110E: Connection is closed.
net.sf.hibernate.exception.GenericJDBCException: Could not execute query
at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:81)
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:30)
at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4110)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1556)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at com.freightliner.mdi.dto.map.BaseLookupsMap.init(BaseLookupsMap.java:87)
at com.freightliner.mdi.dto.map.BaseLookupsMap.reload(BaseLookupsMap.java:71)
at com.freightliner.mdi.web.ui.forecastmanager.ForecastManagerAction.getDpForecastInformation(ForecastManagerAction.java:307)
at com.freightliner.mdi.web.ui.forecastmanager.ForecastManagerAction.getForecast(ForecastManagerAction.java:190)
at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at com.freightliner.mdi.web.application.MdiActionServlet.doPost(MdiActionServlet.java:140)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
at com.freightliner.mdi.web.membershipservices.MdiAccessFilter.doFilter(MdiAccessFilter.java:257)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Caused by: com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Connection is closed.
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.runtimeXIfNotClosed(WSJdbcConnection.java:1883)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1501)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1424)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:260)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:235)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:66)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:779)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:265)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1553)
... 41 more

Environment

Hibernate 2.1.7c
DB2 8

Assignee

Unassigned

Reporter

Pradeep Bhoopalan

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Time tracking

4h

Priority

Major
Configure