RE: [coldbox:7986] Cache is not registered errors

I don’t “think” we are persisting objects past a page request.
Can you share an example of what would do that?

This would do it:
<cfset session.loggedInUser = getPlugin(“beanFactory”).getModel(“user”)>

If the model “user” stores any references to parts of the CB framework in its this or variables scope, those references will be stale after a reinit.

As for logging, I have not been able to figure out how to capture stack trace in the coldbox onException, but we are loging the error and details.

Are you using LogBox? What appenders? Have you enabled bug E-mail reports? Do you have a custom exception handler defined?
Getting stack trace of the error is what you need right now more than anything else. It will tell you exactly what has the reference to the cache factory.

Thanks!

~Brad

Tina,

Can you identify the file and line that is having the error? If so, pasting some of that code–and the code the sets the matching object into the cache will help us help you.

Thanks,

Aaron Greenlee
http://aarongreenlee.com/

Hi Brad and Aaron,

Thank you for the feedback. I’ve confirmed that we are not using persisting objects past a page request. Brad thanks for the example.

As for the exception handler it’s mapped in the Coldbox.cfc and the mapped handler gathers info from the exceptionBean and CGI var and passes them to the CF error logs.We’ve been unsuccessful in figuring out how to capture a stack trace.
Below is code for the exception handler.

Aaron, unfortunately we can’t see to nail down the file that is causing the error, the path info in the error logs is from all over the site, different users, different handlers and layouts, seemingly no common thread. This just started when we ungraded to build 114, so it seems that is a change in the build that we are somehow not accounting for.

Thanks again for all your thoughts.

code for the exception handler:
var context = exceptionBean.getTagContext();
var contextMessage = ‘’;
if (!arrayIsEmpty(context)) { contextMessage &= context[1].raw_trace;}

var ErrorToLog = [];
arrayAppend(ErrorToLog, ‘Exception Caught by ColdBox’);
arrayAppend(ErrorToLog, exceptionBean.getMessage() );
arrayAppend(ErrorToLog, exceptionBean.getMissingFilename() );
arrayAppend(ErrorToLog, exceptionBean.getDetail() );
arrayAppend(ErrorToLog, exceptionBean.getExtraInfo() );
arrayAppend(ErrorToLog, contextMessage );
arrayAppend(ErrorToLog, ‘http_user_agent=’ & cgi.http_user_agent);
arrayAppend(ErrorToLog, ‘remote_host=’ & cgi.remote_host);
if(trim(cgi.http_referer) NEQ ‘’) { arrayAppend(ErrorToLog, ‘http_referer=’ & cgi.http_referer); }
if(trim(cgi.query_string) NEQ ‘’) { arrayAppend(ErrorToLog, ‘q=’ & cgi.query_string); }
arrayAppend(ErrorToLog, ‘path_info=’ & cgi.path_info);
if(structKeyExists(rc,‘searchText’))
if(trim(rc.searchText) NEQ ‘’) { arrayAppend(ErrorToLog, ‘searchText=’ & rc.searchtext); }
if(structKeyExists(rc,‘page’))
if(trim(rc.page) NEQ ‘’) { arrayAppend(ErrorToLog, ‘page=’ & rc.page); }

writeLog(application=true ,text = arrayToList(ErrorToLog, ’ | ') ,type = ‘Error’ ,file = ‘ColdBoxExceptions’);

Thanks
Tina

You need to be using exceptionBean.getStackTrace(). Mind the line breaks when you look at it for it to make more sense.

You can also serialize the array that getTagContext() returns, but to be human readable, it would need to be de-serialized and most likely cfdumped.

I’d start with the stack trace and leave that code in for a few days. We’ll get to the bottom of this.

~Brad

Thanks Brad,

I’ll get the stack trace in place and share our findings.

Thanks
Tina

Hello Again,

I was able to capture the stack track on this error, Wow you were right about the line breaks. Anyway, I haven’t been able to pull a smoking gun out of it.
Any, thoughts from the group?

Stack Trace:
Exception Caught by ColdBox | Cache template is not registered.Valid cache names are |
coldfusion.runtime.CustomException: Cache template is not registered.Valid cache names are
at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
at cfCacheFactory2ecfc1934905714$funcGETCACHE.runFunction(D:\ColdBox_RC1_114\system\cache\CacheFactory.cfc:191)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfController2ecfc1601029199$funcGETCOLDBOXOCM.runFunction(D:\ColdBox_RC1_114\system\web\Controller.cfc:122)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfRenderer2ecfc1524787415$funcINIT.runFunction(D:\ColdBox_RC1_114\system\plugins\Renderer.cfc:35)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfPluginService2ecfc821676296$funcNEW.runFunction(D:\ColdBox_RC1_114\system\web\services\PluginService.cfc:111)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
at cfPluginService2ecfc821676296$funcGET.runFunction(D:\ColdBox_RC1_114\system\web\services\PluginService.cfc:151)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfController2ecfc1601029199$funcGETPLUGIN.runFunction(D:\ColdBox_RC1_114\system\web\Controller.cfc:328)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cfColdbox2ecfc2113566847$funcPROCESSCOLDBOXREQUEST.runFunction(D:\ColdBox_RC1_114\system\Coldbox.cfc:256)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582)
at cfApplication2ecfc206493347$funcONREQUESTSTART.runFunction(D:\webroot\delphiglass_com\Application.cfc:55)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88)
at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:258)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:349)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:200)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at com.intergral.fusionreactor.filter.FusionReactorFilter.b(FusionReactorFilter.java:376)
at com.intergral.fusionreactor.filter.FusionReactorFilter.c(FusionReactorFilter.java:254)
at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:164)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at com.seefusion.Filter.doFilter(Filter.java:49)
at com.seefusion.SeeFusion.doFilter(SeeFusion.java:1500)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Thanks
Tina

Tina,

I’ve sent you and Rob an email. Going to need your source.

-A