Fixing "The system has attempted... Null Pointers are another name for undefined values".

Developer Side / Tutorials / Coldfusion

Lately I've dealt with transferring Coldfusion websites from one server to another and got this weird 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.

Pretty strange this message that says "...which usually indicates a programming error" since my code worked just fine on the other server, so naturally I took the error literally and started diggin' through the code to look for these Null Pointers. Now, this is a pretty useful error when you work with, for example, functions but it didn't seem to be the case.

The only difference between the two servers was the version of MySQL, the old one had 4.1.22 and the new one(the one on which the error was showing) had MySQL 5.0.

Is this causing the problem, you say? You got it! It seems that the Coldfusion MySQL 4/5 connector has a problem maintaining an open connection across requests, so all you need to do to fix the problem (temporarily of course, until a hot fix comes out from Adobe) is to follow these simple steps:

  1. Log in your Coldfusion administrator
  2. Open the "Data Sources" section
  3. Click to edit the particular data source
  4. Show advanced settings
  5. uncheck the "Maintain connections across client requests" checkbox and Submit


Article by
Alexandru Trican
Senior Programmer

Added on Mon, Apr 18 2011 - 9:11:21 AM CST

people like this