My Battle with null null errors

A few months ago I randomly  started seeing one of the most frustrating errors in my CF error logging system, the dreaded "null null" error. I had fought this error in the CFMX 6 days. It seems that a "null null" can be caused by several different issues and seems to be a general error message.  Due to this error not being caused by one problem,  I have seen lots of suggestions on how to fix this error. Some of the popular fixes are increasing JVM memory  from 512 to 640, convert client vars to session vars (this one worked for me in CFMX 6.0) or a CFMX 6.1 hot fix for corruption of the ColdFusion cookies.  Most of these issues have been fixed in CFMX 7, but I found one that was not or shall I say it found me.

In short I was accentually trying to pass a value to a function from a query where the query did not return data.  It seems that most functions have a customized error, but some functions like date functions will throw a "null null" error.

<cfset myQuery=querynew("Column1")>
<cfoutput>#day(myQuery.Column1)#</cfoutput>

If you are running an error handling template you get something like " null null The error occurred on line 38." in the Error.Diagnostics value. If the error is thrown in an include, you will still get the same error, but no indication the error was in an include. Just that the error was on line number X. Also, of you look at the contents of the Error.generatedcontent for a "null null" error you will see that the include with the error does not even show up. In fact that was my first and only clue to tracking this error down.

Comments
Damian T.'s Gravatar Hi,

I've localized this error inside some customtags WITHOUT any includes. This error occurs even at places where definitely are pure coldfusion-tags.

It seems to be a outofmemory-like-problem.

I've posted a more detailed comment here:
http://www.talkingtree.com/blog/index.cfm/2004/7/2...
# Posted By Damian T. | 9/19/06 10:38 AM
# Posted By mgwalk | 3/25/08 1:07 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.001. Contact Blog Owner