title: Invalid Component Definition
body: <p>I'm having an issue in the logs I cannot replicate on the browser. I'm getting hundreds of these per day</p>
  
  <pre><code>invalid component definition, can't find component [cfc.udf]
  </code></pre>
  
  <p>The cfc are stored in a cfc folder one level above the app. This is so that many apps can use the same cfc.</p>
  
  <p>Folder structure:</p>
  
  <pre><code>---- cfc
  --------- udf.cfc
  ---- myApp
  --------- application.cfc
  </code></pre>
  
  <p>In the application.cfc, I'm using application-specific mappings because this is set on a lot of different load-balanced-servers in production as well as a QA environment and local testing environment and keeping them all synced would be difficult. </p>
  
  <p>At onRequestStart, I have a function that restarts the application every 5 minutes. It was supplied by a consultant. I suspect that this is the culprit because the logs show these errors coming in at exactly 5 minute intervals</p>
  
  <pre><code>&lt;cfcomponent&gt; 
      &lt;cfset This.name = "myApp"&gt;
      &lt;cfset This.Sessionmanagement=true&gt;
      &lt;cfset This.Sessiontimeout="#createtimespan(0,0,30,0)#"&gt;
      &lt;cfset this.mappings['/cfc'] = ExpandPath('../cfc')&gt;
      &lt;cffunction name="onApplicationStart"&gt;
          &lt;cfset Application.udf = createObject("component", "cfc.udf").init()&gt;
      &lt;/cffunction&gt;
      &lt;cffunction name="onRequestStart"&gt;
          &lt;cfset appRefreshMinutes = 5&gt;
          &lt;cfif Not IsDefined("Application.refreshTime")&gt;
              &lt;cfset currentMinute = Minute(Now())&gt;
              &lt;cfset Application.refreshTime = DateAdd("n", -(currentMinute MOD appRefreshMinutes)+appRefreshMinutes, Now())&gt;
              &lt;cfset Application.refreshTime = DateAdd("s", -(Second(Application.refreshTime)), Application.refreshTime)&gt;
          &lt;/cfif&gt;
          &lt;cfif Now() GTE Application.refreshTime Or IsDefined("URL.reload")&gt;
              &lt;cflock name="ApplicationInit" type="exclusive" timeout="5" throwontimeout="false"&gt;
                  &lt;cfif Now() GTE Application.refreshTime Or IsDefined("URL.reload")&gt;
                      &lt;cfset OnApplicationStart()&gt;
                      &lt;cfset Application.refreshTime = DateAdd("n", appRefreshMinutes, Application.refreshTime)&gt;
                  &lt;/cfif&gt;
              &lt;/cflock&gt;
          &lt;/cfif&gt;
      &lt;/cffunction&gt;
  &lt;/cfcomponent&gt;
  </code></pre>