Ray Camden just posed an interesting problem to the CFGuru mailing list regarding DSNs failing after a restart of CF. It just happens that I ran into this problem a while back and eventually uncovered the problem with jrun-resources.xml.

The longer explanation based on my test is the following:

This sounds like the jrun-resources.xml and neo-query.xml are out of sync. Check jrun-resources.xml to confirm that there is only 1 datasource node for that particular datasource. I have seen some cases where a manual or externally automated modification to jrun-resources.xml (say an ISP custom script for adding dsn's or someone at home tinkering with the service factory, or ??) can end up creating duplicate nodes for a particular datasource, each with slightly different settings. ColdFusion MX only expects one node for the datasource. On start up it reads jrun-resources.xml, finds the (top-most) node (#1) for a datasource, and updates neo-query with that data. When you edit the datasource from the admin, those modifications will cause the top-most node (#1) to be removed and a new node (#3) to be written, while leaving the previous bottom-most node (#2) which makes it node #1 for that datasource. In other words it reads from the top and writes to the bottom. If the !

new node data is good, then you'll run for as long as CF is up, but when you restart, the top node (#1(#2)) will be read and used, not #3. If there was only one node for a datasource, then it would do the right thing... remove it and rewrite it, but instead there are multiple nodes being shuffled.

This behavior will not occur in the next update as all relevant datasource info will be kept in neo-query.xml without trying to synch it with jrun-resources.xml.