I have a scheduled task that processes thousands of records a day and nearly all of them work fine but for some reason about a dozen records a day will fail and I am not really sure where to start debugging it. I appears that the validation module no longer knows about itself.
Message Could not find the ColdFusion component or interface cbvalidation.models.result.ValidationResult.
COLUMN 0
ID CF_TEMPLATEPROXY
LINE 118
RAW_TRACE at cfValidationManager2ecfc507166245$funcVALIDATE.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\modules\cbvalidation\models\ValidationManager.cfc:118)
TEMPLATE G:\apps\lib\frameworks\coldbox-4.1.0\modules\cbvalidation\models\ValidationManager.cfc
TYPE CFML
Modules reload is set to false. wirebox.singletonReload = false; I don’t have configAutoReload explicitly set to false but my understanding is that config was deprecated in 3.5 right?
Any other ideas? there are a couple of other places on another app that is intermittently throwing the same error on the same line in the cbvalidator module as well.
I don’t know David. It could be a bug in CF. Can you reproduce it at all with load testing? If it were me, I’d wrap a try/catch around that line and start logging some debugging information when the error occurs. For instance, does #expandPath( ‘/cbvalidation’ )# resolve to the correct directory? What does #fileExists( ‘/cbvalidation/models/result/ValidationResult.cfc’ )# return?
Yes I can reproduce it intermittently via load testing I dumped the variables you suggested and got an interesting result when the process runs correctly it resolves to the following path G:\apps\lib\frameworks\coldbox-4.1.0\modules\cbvalidation which is where the module lives. however when it fails it resolves to G:\apps\sites\patientresource\navigationportal\cbvalidation which does not exist but is the path that the application lives in.
Sounds like the application specific mappings are getting lost. ColdBox registers an app mapping at run time on each request (since Application.cfc is created again on each request) for each module. Dump out getApplicationSettings() (I think that’s what it’s called) and see what’s there.
Adobe has had a bad history with application.cfc settings. Andrew Scott dealt with random errors for a long time regarding that. Do you have all your updates installed? If so, and the mappings do seem to be disappearing (though perhaps we should confirm ColdBox actually added them on that request) then we can put in a ticket for Adobe.
Once you’re done with that test, try just adding a mapping yourself to your Application.cfc for /cbvalidation and see if that is a workaround.
Could the app be getting confused with multiple versions of ColdBox running, check the settings in ColdFusion Admin and remove caching of component paths or something like that. Not 100% sure it is your issue, but it looks like it on the surface.
Your mapping idea seems to have solved the problem. I cant say I understand what the issue really is, but I was able to reproduce it almost 100% of the time by simply validating an object in a while loop a few thousand times in the general handler and running that code concurrently in 2 tabs.