Can't find configuration template named 'coldFusion'

ColdFusion Add comments

If you have received this error from a Datasource of type "OTHER"  using the JDBC connector/j driver then this may be your solution. It may apply to other DSN type issues as well.

 

When you create the Datasource initially everything seems to work just fine, but after a while it will mysteriously stop working with the error

 

Error Executing Database Query.

Can't find configuration template named 'coldfusion'

 

 

This is most likley to occur if you are in a sandboxed environment, the reason being that when a DSN is created it uses a pooled connection, and as the CFADMIN has access to everything it works fine. But when the connection has timed out, ColdFusion is no longer able to re-establish the connection due to security restrictions of the site now trying to establish the connection. 

The template named ColdFusion the error refers to would seem to be the  file /com/mysql/jdbc/configs/coldFusion.properties from inside the connector/j jar, which the MySQL connector tries to use to do some autoconfiguration for coldfusion to optimise it.

 

If you add the following to your JDBC URL, then this should resolve the problem by stopping the ColdFusion optimisation and thus removing the need for the conenctor to access that file.

 

autoConfigureForColdFusion=false

 

E.G

 

JDBC:mysql://myserver:3306/myDatabase?autoConfigureForColdFusion=false&allowMultiQueries=true&useDynamicCharsetInfo=false 

 

3 responses to “Can't find configuration template named 'coldFusion'”

  1. ColdFusion Says:
    Thanks for this Russ - The workaround worked but the question is though... how on earth do we find this optimisation code?? It must be missing from the installation somehow.
  2. Russ Says:
    The file was not missing as I said it was a permissions issue causing the error in my case. If the file was missing, I would expect the DSN would fail immediately as soon as you created it.
  3. ColdFusion Developer Says:
    Maybe I should have read the bit between the problem and your solution ;-)

Leave a Reply

Leave this field empty

Powered by Mango Blog. Design and Icons by N.Design Studio