-->
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.  [ 2 posts ] 
Author Message
 Post subject: Is there a way to configure resullt set in hibernate
PostPosted: Sat Sep 15, 2007 5:19 pm 
Newbie

Joined: Tue Nov 14, 2006 3:44 pm
Posts: 5
We are getting the following exception with nested resultset -
com.ibm.db2.jcc.b.SqlException: Invalid operation: result set closed.

On doing some more research online, I found a simialar article which mentioned with db2jcc, the default mode for ResultSet
is TYPE_FORWARD_ONLY.
When it first reaches the end of the ResultSet, it returns false and
closes the ResultSet!

So when rs2 is completed, it closes rs2 but why is ResultSet rs1 also
closed when there are more rows in rs1?

The workaround for this is to change the ResultSet type to
TYPE_SCROLL_SENSITIVE / TYPE_SCROLL_INSENSITIVE

Could anyone advice how to change the result set type? We are using hibernate so there is no where in my code where I am defining and using result set. Is there any configuration we can change to set up hibernate to use result set with TYPE_SCROLL_SENSITIVE / TYPE_SCROLL_INSENSITIVE??


Please advice.

Stack Trace:
[9/13/07 20:36:52:862 EDT] 00000034 SystemOut O 2007-09-13 20:36:52,862 [WebContainer : 0] INFO GZIPFilter - GZIP supported, compressing
[9/13/07 20:36:53:085 EDT] 00000034 SystemOut O 2007-09-13 20:36:53,085 [WebContainer : 0] WARN JDBCExceptionReporter - SQL Error: -99999, SQLState: null
[9/13/07 20:36:53:085 EDT] 00000034 SystemOut O 2007-09-13 20:36:53,085 [WebContainer : 0] ERROR JDBCExceptionReporter - Invalid operation: result set closed
[9/13/07 20:36:53:085 EDT] 00000034 SystemOut O 2007-09-13 20:36:53,085 [WebContainer : 0] WARN JDBCExceptionReporter - SQL Error: -99999, SQLState: null
[9/13/07 20:36:53:085 EDT] 00000034 SystemOut O 2007-09-13 20:36:53,085 [WebContainer : 0] ERROR JDBCExceptionReporter - Invalid operation: result set closed
[9/13/07 20:36:53:107 EDT] 00000034 SystemOut O 2007-09-13 20:36:53,086 [WebContainer : 0] ERROR JDBCExceptionReporter - Could not execute query
com.ibm.db2.jcc.b.SqlException: Invalid operation: result set closed
at com.ibm.db2.jcc.b.kf.lb(kf.java:3498)
at com.ibm.db2.jcc.b.kf.a(kf.java:1430)
at com.ibm.db2.jcc.b.kf.getString(kf.java:1294)
at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:1848)
at net.sf.hibernate.type.StringType.get(StringType.java:18)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66)
at net.sf.hibernate.loader.Loader.hydrate(Loader.java:686)
at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:627)
at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:586)
at net.sf.hibernate.loader.Loader.getRow(Loader.java:501)
at net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
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.filter(SessionImpl.java:3523)
at net.sf.hibernate.impl.SessionImpl.filter(SessionImpl.java:3420)
at com.borders.hr.einfo.dao.impl.HibernateHelper.initializeActiveContents(HibernateHelper.java:73)
at com.borders.hr.einfo.dao.impl.DivisionMenuDAOImpl.getSubmenus(DivisionMenuDAOImpl.java:455)
at com.borders.hr.einfo.busobjs.DivisionMenuManager.getSubmenus(DivisionMenuManager.java:132)
at com.borders.hr.einfo.actions.app.PortalHelper.getSubmenusForTopLevelName(PortalHelper.java:138)
at com.borders.hr.einfo.actions.app.DisplayPortal.getMenus(DisplayPortal.java:181)
at com.borders.hr.einfo.actions.app.DisplayPortal.execute(DisplayPortal.java:89)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
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.service(ServletWrapper.java:907)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.borders.servlet.filters.GZIPFilter.doFilter(GZIPFilter.java:52)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
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.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:556)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:606)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:979)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1064)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
[9/13/07 20:36:53:121 EDT] 00000034 SystemOut O 2007-09-13 20:36:53,107 [WebContainer : 0] ERROR DivisionMenuDAOImpl - Hibernate error getting a parent menu.
net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.filter(SessionImpl.java:3526)
at net.sf.hibernate.impl.SessionImpl.filter(SessionImpl.java:3420)
at com.borders.hr.einfo.dao.impl.HibernateHelper.initializeActiveContents(HibernateHelper.java:73)
at com.borders.hr.einfo.dao.impl.DivisionMenuDAOImpl.getSubmenus(DivisionMenuDAOImpl.java:455)
at com.borders.hr.einfo.busobjs.DivisionMenuManager.getSubmenus(DivisionMenuManager.java:132)
at com.borders.hr.einfo.actions.app.PortalHelper.getSubmenusForTopLevelName(PortalHelper.java:138)
at com.borders.hr.einfo.actions.app.DisplayPortal.getMenus(DisplayPortal.java:181)
at com.borders.hr.einfo.actions.app.DisplayPortal.execute(DisplayPortal.java:89)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
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.service(ServletWrapper.java:907)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at com.borders.servlet.filters.GZIPFilter.doFilter(GZIPFilter.java:52)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
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.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:556)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:606)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:979)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1064)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 15, 2007 9:48 pm 
Newbie

Joined: Wed Jun 21, 2006 2:25 pm
Posts: 15
An indirect response,
1. turn on hibernate logging to find out what it is trying to do.
2. When you write a sample test class without using hibernate do you see the same issues (aka rs2 and rs1 are closed simultaneusly)

This will help you figure out where the problem lies. If it is with the db2 driver you could ask for support.

anand raman


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.