ColdFusion 500 Null Error Revisited

Posted July 14, 2006 at 2:10 PM by Ben Nadel

Tags: ColdFusion

I recently got a 500 Null error half way through the output of a ColdFusion page. I have rarely ever seen this before. If you have read my other post about 500 null errors in ColdFusion, it's usually an error before any data reaches the browser. But half way through the page? This is new.

More than new, it was frustrating. ColdFusion did not provide any error message or template line code or anything. The only thing I knew was the template that was executing. After doing the commenting, uncommenting dance, I narrowed it down to this line:

  • #REQUEST.UDFLib.Text.ToAsciiString( .... )#

This line worked on the development server, but not on the live server (where the 500 null was showing up). The problem was instantly obvious to me (as I wrote the code). The method ToAsciiString() was a new method that I had written in the Text User Defined Library (UDFLib.Text). I had uploaded the code that referenced it, but I had forgotten to upload the updated UDFLib.Text file.

On the live site, I was attempting to reference a function that was not there. Ordinarily, this sort of problem would throw this sort of an error:

The method 'ToAsciiString' could not be found in component D:\....\Text.cfc. Check to ensure that the method is defined, and that it is spelled correctly. <br>The error occurred on line 40.

In fact, that IS the error that get's thrown on the development server when trying to duplicate the error for research. Not sure why it gives 500 null on the live server. Maybe it has something to do with the debugging settings.



Reader Comments

Feb 20, 2008 at 6:25 PM // reply »
8 Comments

I just ran into a 500 NULL error. It was very frustrating. Turns out I needed to duplicate the struct returned from a private method in the component and it then worked fine.


Feb 20, 2008 at 9:14 PM // reply »
8 Comments

Actually, it looks like that wasn't it. I'm going to try to reproduce it. Maybe have been from the same process but trying to send a variable in the client scope that didn't exist...


Feb 21, 2008 at 10:13 AM // reply »
11,246 Comments

@Allen,

Sometimes, the easiest thing to do to debug is throw a CFFlush tag right when you start processing the page. That way, any error that gets thrown is more likely to be "displayed" rather than just show up in a secretive way. This won't help all the time, but it will help some of the time.


Mar 25, 2008 at 1:41 PM // reply »
3 Comments

I am getting this error?
null null The error occurred on line -1. every so often.


Apr 15, 2011 at 4:40 PM // reply »
4 Comments

I've seen some people have this issue with having client variables enabled and stored in cookies.

Setting it to store in DB or turning off client variables sometimes fixes it.


Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 23, 2013 at 9:52 PM
Preventing Links In Standalone iPhone Applications From Opening In Mobile Safari
@Muhmmadibn Did you figure out a solution to launching PDFs? I am running into the same issues myself. There is no way to close the PDF or go back once you launch it. Thanks in advance! ... read »
May 23, 2013 at 6:06 PM
The Girl Who Broke My Heart, And Made Me A Better Person
Good day,ladies and gentle men, my name is Dr AMADI the great spell caster in Africa, i have help so many people for different kind of problems,who say there is no solution to problems on earth, that ... read »
May 23, 2013 at 4:26 PM
ColdFusion QueryAppend( qOne, qTwo )
@Heather, Glad people are still getting value out of this! ... read »
May 23, 2013 at 3:49 PM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@WebManWalking, I meant the code at the bottom (not the video). I did try to experiment with an intermediary variable, like: value = users.id[ i ]; arrayContains( userIDs, value ); ... but t ... read »
May 23, 2013 at 11:06 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben, Are you talking about As Number: YES As String: YES As Java: YES? If so, that's with 3 different ways of referencing the constant 1, not users.id[1]. Query object references(*) are what seem ... read »
May 23, 2013 at 9:55 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Dan, According to the CF Admin, I'm running Java "1.6.0_45". As far as the DB column, in the database it's an INT. I'll see if I can dig into what CF sees it as. @WebManWalking, But h ... read »
May 23, 2013 at 9:49 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben, I think the problem is that we're used to loose typing in ColdFusion, like JavaScript. If a value is a number but it's needed in an expression to be a string, noooo problem. I've encountered ... read »
May 23, 2013 at 9:47 AM
ColdFusion QueryAppend( qOne, qTwo )
You rock! Thank you, thank you, thank you!!! ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools