tracker issue : CF-3039387

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 78969:When ColdFusion is running, and successfully makes one or more exchanges with a database ( MySQL in my setup ), and then that database server is restarted ( the MySQL service is restarted ), the first

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): David McGuigan / David McGuigan (David McGuigan)

Created: 07/21/2009

Components: Database, CFQuery

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 1

Problem:

When ColdFusion is running, and successfully makes one or more exchanges with a database ( MySQL in my setup ), and then that database server is restarted ( the MySQL service is restarted ), the first cfquery that executes in any application using that datasource will return this error:The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.Null Pointers are another name for undefined values.My guess is that MySQL and CF lose their connection and ColdFusion doesn’t successfully recooperate. I think the solution is to catch those errors in the CFML engine itself and re-connect to the database server without returning an error to the code. I know this issue happens a lot in shared hosting, and although it’s only once per MySQL restart per application, it’s an important fix.
Method:

1.Run any query using cfquery using MySQL data Source.
2.Restart MySql server.
3.Run the query again.
4.Exception is thrown:-The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Result:

07/23 13:17:41 Error [web-0] - Error Executing Database Query.Communications link failure due to underlying exception:   ** BEGIN NESTED EXCEPTION **   java.net.ConnectException MESSAGE: Connection re
fused: connect  STACKTRACE:  java.net.ConnectException: Connection refused: connect     at java.net.PlainSocketImpl.socketConnect(Native Method)        at java.net.PlainSocketImpl.doConnect(PlainSocke
tImpl.java:333)         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)       at java.net.SocksSocketImpl.conn
ect(SocksSocketImpl.java:366)   at java.net.Socket.connect(Socket.java:519)     at java.net.Socket.connect(Socket.java:469)     at java.net.Socket.<init>(Socket.java:366)      at java.net.Socket.<init
>(Socket.java:209)      at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:267)      at com.mysql.jdbc.Connection.cre
ateNewIO(Connection.java:2739)          at com.mysql.jdbc.Connection.<init>(Connection.java:1553)   a... The specific sequence of files included or processed is: C:\ColdFusion9\wwwroot\Bugs\78969\7896
9.cfm, line: 1
07/23 13:18:36 Error [web-1] - '' The specific sequence of files included or processed is: C:\ColdFusion9\wwwroot\Bugs\78969\78969.cfm, line: 1
removeOnExceptions is true for localMysql. Closed the physical connection.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3039387

External Customer Info:
External Company:  
External Customer Name: David McGuigan
External Customer Email: 5E0D54C04462BF5E992016B6
External Test Config: 07/21/2009

Attachments:

Comments:

+1 vote. Agreed. -- Adam
Vote by External U.
23292 | November 10, 2011 06:59:33 PM GMT