aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate error -result set not closed. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate error -result set not closed." Watch "Hibernate error -result set not closed." New topic
Author

Hibernate error -result set not closed.

Keerthi Pandey
Greenhorn

Joined: Feb 08, 2009
Posts: 7
Hi,

I am working with an application which uses hibernate. I am trying to get the output from a table which uses a simple query

select * from App where appNo = 12312

while retrieving m getting the error: Invalid operation: result set closed

Here is the stack trace:

I am trying[7/20/09 13:43:48:563 IST] 00000030 SystemOut O 2009-07-20 13:43:48,547 DEBUG net.sf.hibernate.util.JDBCExceptionReporter - SQL Exception
com.ibm.db2.jcc.c.SqlException: Invalid operation: result set closed
at com.ibm.db2.jcc.c.qc.mb(qc.java:3413)
at com.ibm.db2.jcc.c.qc.c(qc.java:290)
at com.ibm.db2.jcc.c.qc.next(qc.java:277)
at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.next(WSJdbcResultSet.java:2468)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:200)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1536)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at com.kroger.accounting.ces.dao.hibernate.AssetDAO.calcProjOverRuncost(AssetDAO.java:221)
at com.kroger.accounting.ces.dao.hibernate.AssetDAO.add(AssetDAO.java:101)
at com.kroger.accounting.ces.dao.hibernate.AssetDAO.split(AssetDAO.java:322)
at com.kroger.accounting.ces.service.spring.AssetService.standardSplit(AssetService.java:1119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:59)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:138)
at $Proxy79.standardSplit(Unknown Source)
at com.kroger.accounting.ces.struts.actions.AssetAction.standardSplit(AssetAction.java:1862)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.kroger.accounting.ces.struts.actions.CESBaseAction.dispatchAction(CESBaseAction.java:174)
at com.kroger.security.actions.KrogerSecureStrutsDispatchAction.execute(KrogerSecureStrutsDispatchAction.java:44)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:465)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at com.kroger.accounting.framework.Controller.process(Controller.java:16)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:92)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

please help..
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

I'm wondering what you're doing in code?

Here's a quick snippet of code from my website that does a simple SQL query with Hibernate.


Performing Queries (including SQL) with Hibernate

Does your code look anything like that?

-Cameron McKenzie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate error -result set not closed.