I'm using ColdFusion with Microsoft SQL Server 2005 and on occasion I get this error:
"[Macromedia][SQLServer JDBC Driver]Object has been closed."
The traceback invariably leads to an SQL query as one would expect, even simple SELECT commands with no JOINs or input parameters or anything fancy at all.
The only solution I've heard about so far is to restart "the service", which I can only imagine refers to the SQL Server service. I've tried restarting both the SQL Server and the ColdFusion Service, but it still keeps happening at random times.
(Also a restart isn't a solution. One cannot have arbitrary pages giving arbitrary error messages at arbitrary times in a production environment.)
When it occurs, it occurs persistently for a few minutes, then goes away and might come back in a few seconds or minutes. It started happening when I was developing a JavaScript portion of my application which should have nothing to do with either the ColdFusion code or the SQL commands.
My searches online have been fruitless so far.
Any help appreciated.
This is old, but I just ran into this and found a way to do it without restarting CF.
In the ColdFusion Administrator go to your Data Sources and edit the one that's causing your problem. Make a change in it, like checking an unimportant box, and Submit.
This will reconfigure the connection and allow it to work. Go back in and un-tick the box (if you don't really want it ticked).
For example. I turned off "Enable High ASCII characters..." hit submit and the datasource worked. I then went back in and checked it back off and submit the changes again.
No restart! Ideal if this is a production box.
We ran into this problem with CF9 and restarting the service didn't help. We deleted and recreated the offending DSN in the CF configuration, and that has resolved the issue. So if the other solutions don't work, give this a try.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With