Close Cursor Error

Sai Deshpande

Active Member
Hi All,

I am facing an business function close cursor issue when I run a batch application. Below are the details:

I have copied a custom business function from Xe in E900 to be used in a custom report. I created new data structure and c business function .h, .c files.
Then I ran the codechangecom for these files. The build was successful.
Below is the error i get in jdedebug.log after running the report.

Oct 05 08:42:51.501144 - 4120/3636 WRK:Starting jdeCallObject Exited jdeCloseDictionary with DDType 0
Oct 05 08:42:51.501145 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_InitBhvr
Oct 05 08:42:51.501146 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_InitBhvr with Success (UserHandle 29313008)
Oct 05 08:42:51.501147 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheInit - Name:[DS5909158C5]
Oct 05 08:42:51.501148 - 4120/3636 WRK:Starting jdeCallObject Found existing cache, total references:[544]
Oct 05 08:42:51.501149 - 4120/3636 WRK:Starting jdeCallObject hCache:[29257A78] Nm:[4DS5909158C5] Recs:8 Curs:0 Hnds:544 Cchs:10 INIT exist
Oct 05 08:42:51.501150 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheOpenCursor (Called by: c:\e900\DV900\source\B5909158.c line 429)
Oct 05 08:42:51.501151 - 4120/3636 WRK:Starting jdeCallObject Open Cursor Success - hCursor:[29204DB0] hCache:[29257A78]
Oct 05 08:42:51.501152 - 4120/3636 WRK:Starting jdeCallObject hCache:[29257A78] Nm:[4DS5909158C5] Recs:8 Curs:1 Hnds:544 Cchs:10 CURS open
Oct 05 08:42:51.501153 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheFetch - hCursor:[29204DB0]
Oct 05 08:42:51.501154 - 4120/3636 WRK:Starting jdeCallObject hCache:[29257A78] Nm:[4DS5909158C5] Recs:8 Curs:1 Hnds:544 Cchs:10 FTCH next
Oct 05 08:42:51.501155 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheFetchPosition - hCursor:[29204DB0]
Oct 05 08:42:51.501156 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheAdd
Oct 05 08:42:51.501157 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_GetEnv
Oct 05 08:42:51.501158 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_GetEnv with Success
Oct 05 08:42:51.501159 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_InitUser with (AUTO commit mode)
Oct 05 08:42:51.501160 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_BeginTransaction (UserHandle 29168A48)
Oct 05 08:42:51.501161 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_BeginTransaction with Success (UserHandle 29168A48)
Oct 05 08:42:51.501162 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_InitUser with Success (UserHandle 29168A48)
Oct 05 08:42:51.501163 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_FetchKeyed (hRequest 291048B0)
Oct 05 08:42:51.501164 - 4120/3636 WRK:Starting jdeCallObject ORACLE DBRsetReq conn=09618DE0 requ=29109008 E1PDRAC (JDEPD)
Oct 05 08:42:51.501165 - 4120/3636 WRK:Starting jdeCallObject SELECT * FROM DD900.F9207 WHERE ( FRDTAI = '078O' )
Oct 05 08:42:51.501166 - 4120/3636 WRK:Starting jdeCallObject ORACLE DBFetch conn=09618DE0 requ=29109008 maxrows=100
Oct 05 08:42:51.501167 - 4120/3636 WRK:Starting jdeCallObject Fetched the record
Oct 05 08:42:51.501168 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCloseDictionary
Oct 05 08:42:51.501169 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_FreeUser (UserHandle 29168A48)
Oct 05 08:42:51.501170 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_FreeUser with Success(UserHandle 29168A48)
Oct 05 08:42:51.501171 - 4120/3636 WRK:Starting jdeCallObject Exited jdeCloseDictionary with DDType 0
Oct 05 08:42:51.501172 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_GetEnv
Oct 05 08:42:51.501173 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_GetEnv with Success
Oct 05 08:42:51.501174 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_InitUser with (AUTO commit mode)
Oct 05 08:42:51.501175 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_BeginTransaction (UserHandle 29168A48)
Oct 05 08:42:51.501176 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_BeginTransaction with Success (UserHandle 29168A48)
Oct 05 08:42:51.501177 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_InitUser with Success (UserHandle 29168A48)
Oct 05 08:42:51.501178 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCloseDictionary
Oct 05 08:42:51.501179 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_FreeUser (UserHandle 29168A48)
Oct 05 08:42:51.501180 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_FreeUser with Success(UserHandle 29168A48)
Oct 05 08:42:51.501181 - 4120/3636 WRK:Starting jdeCallObject Exited jdeCloseDictionary with DDType 0
Oct 05 08:42:51.501182 - 4120/3636 WRK:Starting jdeCallObject ERROR INFO JDEERR - ID= 0, Error= 078O - c:\e900\DV900\source\B5909158.c, Line= 536
Oct 05 08:42:51.501183 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheCloseCursor - hCursor:[29204DB0] hCache:[29257A78]
Oct 05 08:42:51.501184 - 4120/3636 WRK:Starting jdeCallObject hCache:[29257A78] Nm:[4DS5909158C5] Recs:8 Curs:0 Hnds:544 Cchs:10 CURS close
Oct 05 08:42:51.501185 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_FreeBhvr (UserHandle 29313008)
Oct 05 08:42:51.501186 - 4120/3636 WRK:Starting jdeCallObject Exiting JDB_FreeBhvr with Success(UserHandle 29313008)


For example: The line 536 in bold below(from C file)
if (jdeCacheCode != JDECM_PASSED)
{
memset((void *) &dsDE0022, (int) 0x00, sizeof(dsDE0022));
jdeStrncpy(dsDE0022.szDescription, (const JCHAR *)(lpDS->szCacheName),
DIM(dsDE0022.szDescription));
jdeSetGBRErrorSubText(lpBhvrCom, lpVoid, (ID) 0, _J("078O"), &dsDE0022);
idReturnCode = ER_ERROR;
}
} /* end add current LOD record */
} /* end no matching rec exists */

Am I missing anything? Please advise.

Thanks a lot in advance.

Regards,
Sai Deshpande
E900/8.98 Oct 05 08:42:51.501182 - 4120/3636 WRK:Starting jdeCallObject ERROR INFO JDEERR - ID= 0, Error= 078O - c:\e900\DV900\source\B5909158.c, Line= 536 Oct 05 08:42:51.501183 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheCloseCursor - hCursor:[29204DB0] hCache:[29257A78] Oct 05 08:42:51.501184 - 4120/3636 WRK:Starting jdeCallObject hCache:[29257A78] Nm:[4DS5909158C5] Recs:8 Curs:0 Hnds:544 Cchs:10 CURS close Oct 05 08:42:51.501185 - 4120/3636 WRK:Starting jdeCallObject Entering JDB_FreeBhvr (UserHandle 29313008)
 
The problem is not in the close cursor, but in the jdeCacheAdd

Oct 05 08:42:51.501156 - 4120/3636 WRK:Starting jdeCallObject Entering jdeCacheAdd

The cache key must be violated and the add fails. That's why error 078O is raised.

Craig
 
Thank a lot Craig for your feedback.
I will correct the fields.

Regards,
Sai
 
Back
Top