Datasource could not be found when it definitely should be
Hi
We are getting the error "Datasource [NameOfDatasource] could not be found" for a particular CF datasource and can't work out why. A restart of CF resolves the error as does deleting the datasource and recreating it with the exact same properties. This started happening a couple of months after installing CF.
The server is CF 9.0.1 running on Win 2008 R2 (SP1) 64-bit.
The database and port the datasource connects to is definitely correct, so this is not the issue. We thought it may be an issue with the "Maintain connections across client requests" setting not maintaining a connection, but the issue still occurs even with this option turned off.
We create the datasource via code by making a copy of an existing 'template' datasource (using duplicate) and then setting properties of the copy. We use coldfusion.server.ServiceFactory.DataSourceService.DataSources to get the template datasource and to add the new datasource. We are investigating how to create the datasource from scratch using the Admin API (cfide.adminapi.administrator) rather than using the template to see if this resolves the issue, but in the meantime thought we would post to the forums to see if anyone can work out why its failing.
I created another post here that may be related whereby scheduled tasks are running several times daily when they shouldn't be. I don't know if these are related but they seemed to have started happening around the same time.
I didn't know whether this should be classed as a 'Question' or not, so ticked it just in case.
Thanks
Nathan
