pf » The null null Error
The null null Error
We have a global error handler setup on our site that emails us whenever an uncaught exception is thrown by ColdFusion. Ever since we upgraded to ColdFusion MX we had been randomly getting the error null null The error occurred on line 1. thrown from our Application.cfm file. On line 1 was our cfapplication tag. The error would be thrown from several different urls within the site, and we were never able to reproduce it - until last week.
Shortly after I started outputting cookie values in the error emails, I noticed that this error is thrown when the CFTOKEN cookie is not defined but the CFID cookie exists - or vise versa. You will only get this error if you have client variables turned on.
With that I was able to provide some code to reproduce the problem, and report it to Macromedia. If your having this issue you may inquire about bug 57458.
Here's the stack trace that shows up in my logs:
java.lang.NullPointerException at coldfusion.runtime.ClientScopeKey.hashCode(ClientScopeKey.java:29) at java.util.Hashtable.get(Hashtable.java:333) at coldfusion.runtime.ClientScopeServiceImpl.GetClientScope(ClientScopeServiceImpl.java:168) at coldfusion.tagext.lang.ApplicationTag.setupClientScope(ApplicationTag.java:571) at coldfusion.tagext.lang.ApplicationTag.doStartTag(ApplicationTag.java:283) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1876) at cfApplication2ecfm81526635.runPage(/web/Application.cfm:2) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62) at coldfusion.filter.CfincludeFilter.include(CfincludeFilter.java:30) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:93) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.PathFilter.invoke(PathFilter.java:80) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.CfmServlet.service(CfmServlet.java:105) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
--Thanks!
We went through the per-incident tech support once before when we were having several issues (including NULL NULL) and were less than satisfied.
Bug 57458 is a duplicate of bug 45343. This has been fixed but was not included in the CFMX 6.1 Updater -- it is included in CFMX 7.
We have a process that uses quite a few objects (components) and has some very large query data sets. Both of these stressed JRun a bit.
<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>
If I simply comment these lines out the error disappears, it is very odd indeed.
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=b3c51ba1
In my case I was doing a query on query. The first query was being built using queryNew(), querySetCell()... etc and had a field (rank) that contained integers. The rank field was also one of the fields in my ORDER BY clause. When I dumped out the query after it errored in a try-catch statement it looked like normal, valid numbers in the rank field (there were a few 0's - which may be CF's way of representing "other" things). But when I removed the rank field from the ORDER BY clause I didnt get an error. So, I forced the rank field to be a value by doing this: querySetCell(myQuery,"rank",val(someval)); and stuck the rank field back in the ORDER BY clause and it worked.
Hope this helps someone.
Hope this helps.
Hope this helps.
- CFSCRIPT Cheatsheet
- 3 New Image Effects for ColdFusion 8
- Googlebot to Submit Web Forms
- ColdFusion 8 Update 1 Fixes some Image Processing Quirks
- 10 Most Useful Image Functions in ColdFusion 8
- Speaking at NYC CFUG This Week
- Adobe AIR Tutorial for HTML / JavaScript Developers
- INFORMATION_SCHEMA Support in MySQL, PostgreSQL
RSS
add to del.icio.us
Pete Freitag is a software engineer, and web developer located in










