title: ColdFusion 9 ORM - Not Configured For The Current Application
body: <p>I have a directory watcher event gateway instance that is responsible for parsing, loading and storing data received in the CSV format via SFTP. Using <code>entityNew</code> and <code>entityLoad</code>, this process iteratively constructs and flushes a transactional ORM session, ultimately inserting new and updating existing database records reflecting the received data.</p>
  
  <p>This process sporadically fails and reports the following exception:</p>
  
  <pre><code>coldfusion.orm.ORMUtils$ORMNotConfiguredException: ORM is not configured for the
  current application. at coldfusion.orm.ORMUtils.getPersistenceManager(ORMUtils.java:55)
  at coldfusion.orm.ORMUtils._executeQuery(ORMUtils.java:332)
  </code></pre>
  
  <p><strong>Note:</strong> The above exception has been severely abbreviated, but hopefully includes enough detail to serve its purpose.</p>
  
  <p>This exception is not caught and reported by the enterprise server monitor, however it is reflected in the exception log. Because of this I am unable to utilize the enterprise server monitor to review the failure in full detail. I experience between 1 and 3 failures on a daily basis with no correlating patterns in regards to the time of day, file size, application / database server resource consumption or received data transmission source.</p>
  
  <p>I have verified with a case-insensitive directory recursive search that the <code>ormEnabled</code> and <code>ormSettings.datasource</code> properties only exist in the root-level <code>Application.cfc</code> component and are hard-coded. I have also verified with the same type of search that I do not have any rogue <code>ormReload</code> method invocations existing in the codeset.</p>
  
  <p>Accepting answers and welcoming theories now! :)</p>
  
  <p><strong>I'd like to extend a very special thanks for every logical contribution!</strong></p>