Steven Erat's Blog
 
 
Viewing By Entry
 
 

TalkingTree  CFERROR Bug: null null

 

During the general session at CFUN04 this weekend, a ColdFusion user asked a question regarding why "null null" error messages occur in ColdFusion MX. This is bug 51579 and the problem occurs when CFERROR is used for custom exception handling and a Null Pointer Exception occurs at runtime. This causes the cferror variable error.diagnostics to be populated with the value of "null null". Normally, error.diagnostics is the concatenation of cfcatch.message and cfcatch.detail, but during an NPE they each evaluate to null when cferror is used and so the result is "null null". If you know of any other way to generate this rather unhelpful error message and you have a small, exact reproducible case, then please let me know.

Update: This bug has a hotfix for CFMX 6.1 and CFMX 6.1 Updater 1:

Hot fix for null, null errors

 


Comments

Sorry MM that is not the only cause of the null null error. I fear that I do not have much more info, but I can add this.
We had / have this problem on two of our sites. (Both on same server) We do not have any CF error on the sites. Someone on the cftalk list tipped me off that client vars maybe causing the problem. So, we converted the site from using client vars to session and the null null problem went from 2-5 errors a day to 1-2 errors every few months after the client to session convert. I still have no idea how to fix the remaining nuill null errors

Seems the problem is somehow related to the session / client vars becoming corrupt. I'll see a user hit the site 4-5 times and get null null errors but other users at the same time can see the site normally.


Philip,


That does seem to match the description of error.diagnostics evaluating to null null. The java.lang.outofmemoryerror occurs in a variety of contexts, and the default-err or default-event logs may show the error in a better context. Not all java.lang.outofmemoryerror errors mean the JVM is out of memory, sometimes that's catch-all error thrown by the JVM when it doesn't have a better message. There's a technote on memory errors, and it has 2 known scenarios for getting that error when you're not really out of memory in the JVM heap.


Mark,


Thanks for the feedback. I've seen many various postings on the null null error, but again, to conclude the specific origin of the error in other situations a good repro is needed.



Steve,


I get 2 "types" of null null errors


The one listed above, and one where it occurs on the CFAPPLICATION tag in Application.cfm


I think that Mark's comment is probably closest as the StackTrace begins with the following:
java.lang.NullPointerException at coldfusion.runtime.ClientScopeKey.hashCode(ClientScopeKey.java:29)


If it is a Client Variable problem, then we'll have to switch to Session Variables - shouldn't be too much of a pain, just annoying, especially with all of the locking (unless we just let CFMX handle that :P)



Philip,


Regarding the NullPointerException when using session or client variables, this is bug 45343. The NPE occurs when the CFAPPLICATION tag fails if the client browser sends an incomplete or invalid cfid/cftoken pair. There is a hotfix available for this, and pending its publication, this can be obtained by contacting Macromedia Support through the formal channel.



Just wondering the status of the hotfix for this. I've seen the error at work and I just don't like to leave 'floating errors'.
Thanks


Steven


Could you clarify, are you saying that this bug is not only related to client variables but also session variables as well? I have recently seen this error on a high traffic application which does not use client variables.


Thanks


Kola



The blog entry means that if a Null Pointer Exception occurs (regardless of the cause of the NPE) and it is trapped by CFERROR or a global exception handler page, then the variable error.diagnostics will report null null.


One possible cause of an NPE, among others, is a known issue if the CFAPPLICATION tag is used with either session or client management enabled and if the browser returns an invalid CFID or invalid CFTOKEN. When the invalid token is returned in the HTTP Response, the CFAPPLICATION tag will throw a NPE, and CFERROR or the global exception handler page would report "null null" for the error.diagnostics.



I had the same null null problem when running a JRUN configuration instance. The issue was I was calling a CFX tag inside of a script and did not have the required library installed in my class path. For CFMX,
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/instal17.htm you need to have WEB-INF/cfusion/lib to the JVM's classpath. for some reason I also am running verity so had to add WEB-INF/cfusion/lib WEB-INF/cfusion/lib/platform/bin (where platform is _nti40, _solaris, or
_ilnx21) and this caused the tag to start running and stop producing null null. Your problem may be different but I know they can occure when you run a CFX tag w/o all necessary libraryies. (I think it was a UPS gateway call)


It was my question which was asked


This error isn't 100% reproducable, especially since I get it on templates with no CF commands, and the only tag in Application.cfm is a CFAPPLICATION


Another "version" of the error sent via email contains the following:


Diagnostics - null null <br>The error occurred on line -1.
RootCause - [unknown type]
StackTrace - java.lang.OutOfMemoryError


It says out of memory, but it only occurs on odd occasions and nothing else errors at the same time, plus the server has 2gig of RAM, and the JVM is set to have tons of memory...



I get the null null error if I simply have these lines of code present, but if I comment them out it's fine, odd error indeed. This code is wrapped within a cfmail tag as an order confirmation email.

[cfif Order.Country neq '' and Order.Country neq 'us']

Your order will be processed and shipped. The country you selected may have additional international charges (such as customs, duty, tax and/or VAT), these charges are not being imposed or collected, if they are applicable you will be contacted by customs to remit payment at the time of delivery.

[cfelse]

You should receive your [session.item_book_textplural] within one to five business days of the ship date depending upon the shipping destination and shipping method.

[/cfif]


I am having this issue and I'm not using client variables at all. Has anyone looked to see if this possibly occurs with a certain browser? I've noticed that one of the people that regularly has this problem is on a Mac. Perhaps it's the implementation of their browser that sends back a corrupted CFID and/or CFTOKEN.


Hi all

We've been getting this error recently and thought I'd try to add to the pool of knowledge here by describing the conditions under which it occurs.

We use cfftp to open a connection. The Unix guys here closed the port (21) for a while. When they did so it generated the error "null null The error occurred on line 28.", line 28 being the 'server' attribute of the cfftp tag.

When they opened the port the problem went away.

Helpful?

Mick


I'm not using CFFTP at all on my site. I've noticed that I only get this error on my site from people using Safari. It seems odd that a browser could cause a server error. Everything I'm doing on the site is pretty straightforward so I can't imagine what's causing the error.


Hi, all.

We have often experienced such exceptions in our heavy loaded b2b application using ColdFusion MX 7.0.1 and IBM Websphere 6.0.2.
Personally I rarly had these exceptions during the development process on my local machine under JRun4 (Win2000). I've forced this error by producing massive load on our test-machine (Linux + IBM WAS + CFMX7 + IBMJVM1.4.2b5). The session was on moderate size containig some queries, many cfc-objects and many imported customtags (cfimport).
I've noticed, that this problem occurrs mainly when the GC gets close to the maximum heap space value and the GC tries to clean up the heap space. The space the GC is able to clean up ranges between 4 and 2% of the total heap (25 MByte free from 1024 MByte total). It seems, that the GC is not able to handle this situation any more and produces differnet problems within the application: query-requests are send to the DB with wrong parameter values, functions try to convert boolean values to datetime, objects are missing inside the session, document output ends inside the request or (most incredible) the document starts within the HTML!

I hope this experience provides some clues to solve this mystrious problem.

Damian

greets from Germany 8o)


We've found a memory leak when using component-methods in onSessionEnd!

We've simplified our application to the point where the method onsessionend is called. There we have the following call:


arguments.AppScope.sessionCtrl.logout( arguments.SessScope.sessionid );


As told in the LiveDocs you cannot use aplication and session direct when onsessionend fires. So you have to use the arguments. BUT, when you allocate memory inside a method of an component like the above "sessionCtrl.logout" the memory allocation fails with an memory leak. The bigger the allocation, the probably you've overwritten your memory at a place a request ist executed!

So eleminate all object-method calls inside this onsessionend-method, to prevent memory leaks!

If you really need the "logout", for example to remove sessions from a alternative session-table in a database, move your function "logout" from the "cusom component" to the Application.cfc. In our test application no errors occured since this change.

This bug has the Adobe / Macromedia-ID 65114.




Right, this was fixed just after CFMX 6.1, so the issue has been resolved for a few years now.

Here's the snippet from the technote that agrees with my initial blog post about this:

"There are other causes for the "null, null" error as well. The most typical issue is that cferror and/or a global site-wide error handler is being used and your application had a NullPointerException (NPE). The simplest way to diagnose this issue is to temporarily remove the cferror code or the site-wide error handler. The next time the error occurs, the underlying error will be shown rather than the "null, null" error."


At yet here I am in the year 2009 battling null null errors on CF8. I hate coldfusion.


 

 

Calendar

 
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

Search This Site

 
This is an exact search only

About This Site

 
I live west of Boston and work as a Software Engineer with ColdFusion and Flex, specializing in Linux. Recently I graduated in Professional Digital Photography from CDIA.
More about me

Recent Entries

 
Recent Tweets for Fri Oct 2, ..
Recent Tweets for Fri Oct 2, ..
100th ColdFusion Meetup Today..

Recent Comments

 
Posted By Becky the Pregnant:
I am a pregnant woman...I am in love with their salad dressing!!! In fact since my boyfriend won't travel from Lunenburg to Parkhill to get the most s ...

Posted By Violet:
Wow,you don't even imagine how glad I am that I found this article. The thing is that tomorrow I'm gonna deal with this problem. I postponed it for se ...

Posted By Jake Munson:
This info just saved my bacon. I had the "Post Size exceeds the maximum limit" error from a client and google pointed me to your post. Your post is ...

recently played

 
Refugee
by Tom Petty & The Heartbreakers
on Greatest Hits
Greatest Hits, Tom Petty & The Heartbreakers

now playing, a plug-in for itunes

Categories

 
RSS Adobe (33)
RSS Bicycling (9)
RSS Blogging (39)
RSS Books (13)
RSS Breeze (13)
RSS CFMX Podcasts (10)
RSS ColdFusion (423)
RSS Computer Technology (51)
RSS Events (25)
RSS Flash (3)
RSS Flex (20)
RSS Gadgets (10)
RSS HiTech Industry (16)
RSS Java (25)
RSS Learning (57)
RSS Linux (70)
RSS Mac OS X (22)
RSS Macromedia (27)
RSS Meetup (35)
RSS New England (62)
RSS Odds & Ends (25)
RSS Outdoors (32)
RSS Personal (29)
RSS Photography (110)
RSS Photoshop (29)
RSS Podcasts (18)
RSS Rants (19)
RSS Restaurants (8)
RSS Science (34)
RSS Spain (16)
RSS Travel (42)
RSS Twitter (10)
RSS Video (20)
RSS Webcam (3)
RSS Writing (10)

Blogs I Read

 
Terrence Ryan
Ben Forta
Ray Camden
Kinky Solutions
Dan Vega
Gary Gilbert
Simeon Bateman
Red Hat Blogs
O'Reilly Digital Media
O'Reilly Radar
John Nack
The Strobist
Scott Kelby
Matt Kloskowski
Joe McNally
Digital Photography School
Engadget
Science Blog

RSS

 


Add to Google
Add to My Yahoo!

Aggregated By

 


Consumed By Feed-Squirrel.com
Aggregated by ColdFusionBlogger.org

Credits and Stuff

 
BlogCFC - Free ColdFusion Powered Blog Software
CJM Group - ColdFusion Website Hosting


 
 
blog | photos | flickr | referers | webcam | stats | about | contact
 
Copyright © 2009 Steven Erat. All rights reserved.
This is a personal weblog. The opinions expressed here represent my own and not those of my employer