Title: Missing cached objects
Thread: Missing cached objects
Forum: Need Help?
User: alex I'm getting some intermittent errors that I'm really having trouble ironing out.
It could be related to ColdBox or it could be with Transfer, but I suspect that
it might because I've misunderstood exactly how the "onAppInit" and
"onRequestStart" methods work.
I see the errors when I reset my application
with the fwreinit URL parameter. I don't get an error every time -- they seem
to occur randomly. I can reset a dozen times without problem, and then I'll get
an error. Then I try again and it's fine. Or sometimes I'll keep getting the
error five or six times in a row before the reset happens successfully.
three different errors, but they all seem similar. CF can't find an object that
I thought I'd cached permanently. In "onAppInit", I create a TransferFactory
object and a couple other service objects and put them each into the OCM. In
"onRequestStart", I grab these objects from the OCM and put them into the
The most common error seems to be that it can't find the
TransferFactory when calling rc.TransferFactory.getTransfer():
selected method getTransfer was not found.
Either there are no methods with the
specified method name and argument types, or the method getTransfer is
overloaded with arguments types that ColdFusion can't decipher reliably. If this
is a Java object and you verified that the method exists, you may need to use
the javacast function to reduce ambiguity.
But then far less
frequently, it will get past the code that references the TransferFactory and
throw an error trying to access other objects, sometimes immediately, sometimes
after clicking through to a different page in the site. Here's what I see when
it chokes on FumigationGateway.getIncompleteReportsQuery() and
[code]Cannot invoke method
getIncompleteReportsQuery on an object of type java.lang.String with named
Use ordered arguments instead.[/code]
[code]The selected method
canEditStaff was not found.
Either there are no methods with the specified
method name and argument types, or the method canEditStaff is overloaded with
arguments types that ColdFusion can't decipher reliably. If this is a Java
object and you verified that the method exists, you may need to use the javacast
function to reduce ambiguity.[/code]
I've attached my ehMain.cfc where these
objects are placed in cache. I believe I've mapped the methods correctly in
coldbox.xml.cfm because the errors are only intermittent. Everything works most
of the time. It's weird. Any ideas are much appreciated!