CFERROR Bug: null null
Jul 2
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
#1 by Mark W. Breneman on 7/2/04 - 12:11 PM
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.
#2 by Steven Erat on 7/2/04 - 12:24 PM
[P]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. [/P]
[P]Mark, [/P]
[P]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. [/P]
#3 by Philip Arnold on 7/6/04 - 11:07 AM
[P]I get 2 "types" of null null errors[/P]
[P]The one listed above, and one where it occurs on the CFAPPLICATION tag in Application.cfm[/P]
[P]I think that Mark`s comment is probably closest as the StackTrace begins with the following:[BR]java.lang.NullPointerException at coldfusion.runtime.ClientScopeKey.hashCode(ClientScopeKey.java:29)[/P]
[P]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)[/P]
#4 by Steven Erat on 7/6/04 - 11:50 AM
[P]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. [/P]
#5 by Michael Dinowitz on 7/16/04 - 10:01 AM
Thanks
#6 by Kola on 7/22/04 - 4:36 AM
[P]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.[/P]
[P]Thanks[/P]
[P]Kola[/P]
#7 by Steven Erat on 7/22/04 - 8:29 AM
[P]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.[/P]
#8 by c.friedland on 10/26/04 - 3:56 AM
http://livedocs.macromedia.com/coldfusion/6.1/html... 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)
#9 by Philip Arnold on 11/10/04 - 10:25 PM
[P]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[/P]
[P]Another "version" of the error sent via email contains the following:[/P]
[P]Diagnostics - null null [br]The error occurred on line -1. [BR]RootCause - [unknown type] [BR]StackTrace - java.lang.OutOfMemoryError [/P]
[P]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...[/P]
#10 by Matt on 11/22/05 - 12:02 PM
[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]
#11 by John Burns on 2/16/06 - 4:14 PM
#12 by Mick Casey on 7/14/06 - 7:08 AM
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
#13 by John Burns on 7/14/06 - 10:54 AM
#14 by Damian T. on 9/19/06 - 12:08 PM
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)
#15 by Damian T. on 10/19/06 - 1:06 PM
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.
#16 by mgwalk on 3/25/08 - 3:02 PM
[a href="http://kb.adobe.com/selfservice/viewContent.do?ext...ernalId=b3c51ba1&sliceId=1" target="_blank">http://kb.adobe.com/selfservice/viewContent.do?ext......" target="_blank"]http://kb.adobe.com/selfservice/viewContent.do?ext......[/a]
#17 by Bryce on 10/28/09 - 3:22 PM
#18 by Martin on 3/6/10 - 12:33 AM
I host plenty of apps, I never had it .. but with such a renowned app like BlogCFC I face ti problem in CF 8! I spent hours and hours to get rid of it. to no avail .... :-(((((
#19 by travesti on 3/9/10 - 9:32 AM