-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Hibernate2.0 - GenericJDBCException: Could not execute query
PostPosted: Tue Oct 11, 2005 3:24 pm 
Newbie

Joined: Wed Sep 07, 2005 5:11 pm
Posts: 4
The following code returns a list & will be used in a JSP,
If the same JSP page is refreshed or if I use pagination which gets the lookup data, the above query returns an error:
(for 2 or 3 times no error occurs)

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

_________________
Pradeep


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 5:20 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
how are you managing the session? is it being closed on the 1st request and not opened on the 2nd?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 5:47 pm 
Newbie

Joined: Wed Sep 07, 2005 5:11 pm
Posts: 4
For each request a new session is opened.

_________________
Pradeep


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 5:54 pm 
Newbie

Joined: Wed Sep 07, 2005 5:11 pm
Posts: 4
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 is opened for every request.

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

_________________
Pradeep


Top
 Profile  
 
 Post subject: Resolved?
PostPosted: Thu Oct 19, 2006 11:54 am 
Newbie

Joined: Thu Oct 19, 2006 8:56 am
Posts: 1
Location: Charlotte, NC USA
Have you resolved this issue? If so, how did you resolve it? I am having the same problem.

Thank You


Top
 Profile  
 
 Post subject: Re: Hibernate2.0 - GenericJDBCException: Could not execute query
PostPosted: Thu Nov 19, 2009 4:17 pm 
Newbie

Joined: Thu Nov 19, 2009 4:14 pm
Posts: 1
Hi,
I am having the same problem. Does anyone have a solution to this problem? I am using Hibernate3.0. Any response is greatly appreciated.

Thanks,
Manjusha


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.