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
Apr 25, 2010 at 10:20 AM 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.
Apr 25, 2010 at 3:19 PM 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.
Apr 25, 2010 at 5:50 PM Maybe I should have read the bit between the problem and your solution ;-)