If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Result set closed exception

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-21-11, 05:31
Divya_kamath Divya_kamath is offline
Registered User
 
Join Date: Jan 2011
Posts: 13
Result set closed exception

Looking on the help regarding below error:
com.ibm.db2.jcc.am.SqlException: [jcc][t4][10120] [10898][4.11.77] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null

We are using db2 9.7 and getting this error when fetching data from the db2 table.. Sometimes we are able to fetch records correctly and sometimes getting the above error..

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 11-21-11, 06:15
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
try to collect sqlca with additional info when error occures -4470 can have many reasons
might be some info in diag.log
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 11-21-11, 07:09
Divya_kamath Divya_kamath is offline
Registered User
 
Join Date: Jan 2011
Posts: 13
Result set closed exception

These are the error and warning messages found in the diaglog:

2011-11-21-04.48.51.741684-360 E2550463613E634 LEVEL: Warning
PID : 3029 TID : 47827283601728PROC : db2sysc
INSTANCE: db2inst3 NODE : 000 DB : VRB2
APPHDL : 0-800 APPID: *LOCAL.DB2.111025072007
AUTHID : DB2INST3
EDUID : 69 EDUNAME: db2stmm (VRB2)
FUNCTION: DB2 UDB, Self tuning memory manager, stmmCheckIfFreeMemoryIsEnoughForSizeIncr, probe:667
MESSAGE : ZRC=0xFFFFEC49=-5047
DATA #1 : String, 143 bytes
There is not enough free memory for size increase. Free memory in pages: Physical memory = 0, Instance memory = 264082, Database memory = 11200

2011-11-21-04.48.51.742280-360 I2550464248E626 LEVEL: Error
PID : 3029 TID : 47827283601728PROC : db2sysc
INSTANCE: db2inst3 NODE : 000 DB : VRB2
APPHDL : 0-800 APPID: *LOCAL.DB2.111025072007
AUTHID : DB2INST3
EDUID : 69 EDUNAME: db2stmm (VRB2)
FUNCTION: DB2 UDB, Self tuning memory manager, stmmUpdateDBConfig, probe:275
MESSAGE : ZRC=0x82AE00A7=-2102525785=STMM_CONFIG_UPDATE_FAILED
"An attempted configuration update failed"
DATA #1 : String, 75 bytes
Error updating parameter Sheapthres_shr, updateValue = 271, sqlcode = -5047
Reply With Quote
  #4 (permalink)  
Old 11-21-11, 07:31
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
There is not enough free memory for size increase. Fr...
what more do you need...????
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #5 (permalink)  
Old 11-21-11, 07:46
Divya_kamath Divya_kamath is offline
Registered User
 
Join Date: Jan 2011
Posts: 13
Result set closed

When i googled i found the following:
Cause:
The IBM Data Server Driver for JDBC and SQLJ conforms to the JDBC standard to have the cursor automatically closed when all rows have been retrieved from a ResultSet. When ResultSet.next is executed after the cursor is closed this SQLException is thrown.
Resolving the problem:
Modify the application code to conform to the JDBC standard and do not call ResultSet.next after all rows have been retrieved.

Then is it problem with less memory? or any other driver related issues?
Reply With Quote
  #6 (permalink)  
Old 11-21-11, 07:56
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
nothing todo with driver
stmm tries to adjust memory for specific memory block and gets error...
Sheapthres_shr,
sheapthres_shr - Sort heap threshold for shared sorts configuration parameter
pd/psi is good for you....
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #7 (permalink)  
Old 11-22-11, 02:19
Divya_kamath Divya_kamath is offline
Registered User
 
Join Date: Jan 2011
Posts: 13
Result set closed exception

SHEAPTHRES value was 0 and I updated to 250 and restarted the db. Received the same result set closed exception. This exception we got in test instance where we have many number of databases and having more number of appliaction users.

Today we tested in local instance and found the same exception, there we have a single database and only one application user. And in diaglog not found any memory related errors, instead found the below error:

[12:13] 2011-11-22-11.55.12.917000+330 E4957666H535 LEVEL: Error (OS)
PID : 2660 TID : 636 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000 DB : LOC_DB
APPHDL : 0-95 APPID: 10.11.201.60.50516.111122062509
AUTHID : VACAVA
EDUID : 636 EDUNAME: db2agent (LOC_DB)
FUNCTION: DB2 UDB, oper system services, sqloisus3, probe:100
MESSAGE : ZRC=0x83000005=-2097151995
CALLED : OS, -, unspecified_system_function
OSERR : 5 "Access is denied."

So something else could be the cause for result set closed exception? or any changes required from java code side?

Thanks in advance
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On