I am using components rather extensively in my ColdFusion application, and run into a frequent error that my components are undefined, although they definitely ARE defined.
I am defining the components in my Application.cfc file.
<cfset cfcList = "component1,component2,component3">
<cfloop list="#cfcList#" index="local.thisCfcName">
<cfset application.cfc[local.thisCfcName] = createObject(
"component",
"#application.cfcPath##local.thisCfcName#"
)>
</cfloop>
What I have been able to determine: In my onRequestStart function, I am restarting the application on encountering 'init' url variable:
<cfif structKeyExists(url, "init")>
<cfset onApplicationStart()>
</cfif>
It seems that while the application is reinitializing, any other user trying to access the component at that moment will get the following error (the component that fails can vary).
[diag]=Element CFC.COMPONENT1 is undefined in a Java object of type class [Ljava.lang.String; referenced as ''
Is there something I am doing incorrectly here that can solve this issue? I get these errors several times a day, and there must be a resolution, but I have not been able to find any information about this particular issue.