Update Package in Optimized mode / Debug mode.


Well Known Member
HI ,

I have an custom business function which is working good locally and failed on the server.
We have deployed the business function in DV environment in DEBUG mode then it started working good in Server , the same object if we deploy in Optimized mode we are getting the exception.

When i have analysed the server log having issue (Optimized mode) .JdeCachInit is getting failed with the below exception. Please guide.

Error in Optimized mode.

CAC0001075 - (jdeCacheInit) Invalid cache registry
Entering JDB_GetEnv
Exiting JDB_GetEnv with Success
Entering JDB_InitUser with (AUTO commit mode)



Legendary Poster
Are there asynchronous processes or processing involved?

When things work in debug, but not when debug is not on, in my experience there is a high probability that asynchronous processing is involved and things are executing in the wrong order.


Legendary Poster
When you say "DEBUG" mode, I am assuming that you mean you compiled in "debug" mode, i.e. symbol info. It could be you have some sort of buffer overrun, failure to init a variable correctly or other type of memory error that only manifests itself on the server. Additionally, it is possible that compiling with debug info could potentially mask these types of things.

Look at this thread on stackoverflow.com (explains it way better than I ever could). This is for C++ but it is applicable to C as well. Especially look at the part about "guard bytes".


Often times you simply have to debug on the server. I have had numerous occasions where a bug in my code only manifested itself on the server.


Well Known Member
Thanks for the information, I found JdeCacheInit API is getting failed in optimized mode ,so I have used jdeTraceSz1 to know the status of all the parameters in jdedebug.log as below.

jdeTraceSz1(NULL, _J("DEBUG :HUSER %x"),hUser);
jdeTraceSz1(NULL, _J("DEBUG :CacheHandle %x"),idCacheHandle);
jdeTraceSz1(NULL, _J("DEBUG :hUser %s"),szCacheName);
jdeTraceSz1(NULL, _J("DEBUG :Index %x"),Index);
jdeTraceSz1(NULL, _J("DEBUG :ActionCode %s"),lpDS->szCacheActionCode);

The following statement found from the log.
DEBUG :HUSER f0010000
DEBUG :CacheHandle 0
DEBUG :hUser AdvancedPricingCache
DEBUG :Index efefbdec
DEBUG :ActionCode 4

Entering jdeCacheInit - Name:[AdvancedPricingCache]
CAC0001060 - (jdeCacheInit) Invalid environment handle
Invalid huser -f0010000 (this handle is not initialized by any program) - is passed in the optimized mode ,Huser overridden could be happen due to Multi threading or Memory leak or Memory override. Please guide me so that I can narrow down my issue.

Note : JdeCacheInit is called more than 750 time in the logs , only 7 or 8 this bad handle(f0010000) is found and failed for those transaction only
Discover how to build no-code data integrations and business process automations.


VIP Member
Not much we can really tell you based what you've given us. I think the only way the List is going to be able to help you is if you post your code and someone looks it over and finds where the issue may be. These types of issues can be very difficult to pinpoint.