Bleeding Applications (Interceptors and Event Handlers)

I have two associates who have asked me to help figure out why ColdBox
is bleeding applications. I first encountered this about nine months
ago.

Here is the setup:
Coldbox installed in a directory, mapped path of 'coldbox' and
available to multiple applications on a box.
Each application has a unique name in Application.cfc and in the
ColdBox Config.

Here is the issue:
The first ColdBox application (Application_A) is hit and works as
expected. Next, I launch a second application (Application_B). But, it
tries to execute an Event Handler or Interceptor from the first loaded
application (Application_A).

These two applications share a model-layer but nothing else.

The stack-trace allows me to observe the request starting in
Application_B's Application.cfc and then trying to execute the
interceptor from Application_A.

Questions?
What keys does ColdBox use to manage this type of information?

I've confirmed "this.name" within Application.cfc is unique among all
applications.
I've overwritten the coldbox_app_key for each application (and allowed
ColdBox to assign the default 'cbController' appkey).

I expect this is a setting within ColdBox.cfc. I have another
application, same box, same ColdBox, that shares nothing with these
applications and works independently as expected.

Thoughts?

Thanks.

Aaron Greenlee

coldfusion.runtime.NoOperScope$ScopeDisabledException: The requested
scope client has not been enabled.
  at
coldfusion.runtime.NoOperClientScope.bindName(NoOperClientScope.java:
30)
  at coldfusion.runtime.Scope.put(Scope.java:74)
  at coldfusion.runtime.CfJspPage._arrayset(CfJspPage.java:1080)
  at coldfusion.runtime.CfJspPage._arraySetAt(CfJspPage.java:2208)
  at coldfusion.runtime.CfJspPage._arraySetAt(CfJspPage.java:2125)
  at cfClientStorage2ecfc1029641578$funcSETVAR.runFunction(C:\web
\coldbox\system\plugins\ClientStorage.cfc:62)
  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 cfRequest2ecfc1177602418$funcENSUREAUTHORIZEDUSER.runFunction(C:
\web\Application_A\interceptors\Request.cfc:98)
  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:517)
  at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
  at cfRequest2ecfc1177602418$funcPREPROCESS.runFunction(C:\web
\Application_A\interceptors\Request.cfc:37)
  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:517)
  at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
  at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
  at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
  at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389)
  at cfInterceptorState2ecfc1651548979$funcINVOKER.runFunction(C:\web
\coldbox\system\beans\InterceptorState.cfc:127)
  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.CfJspPage._invokeUDF(CfJspPage.java:2582)
  at cfInterceptorState2ecfc1651548979$funcPROCESS.runFunction(C:\web
\coldbox\system\beans\InterceptorState.cfc:80)
  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 cfInterceptorService2ecfc1898131908$funcPROCESSSTATE.runFunction(C:
\web\coldbox\system\services\InterceptorService.cfc:98)
  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.CfJspPage._invoke(CfJspPage.java:2360)
  at cfColdbox2ecfc1027314144$funcPROCESSCOLDBOXREQUEST.runFunction(C:
\web\coldbox\system\Coldbox.cfc:195)
  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 cfApplication2ecfc1975542690$funcONREQUESTSTART.runFunction(C:\web
\Application_B\Application.cfc:66)
  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.LicenseFilter.invoke(LicenseFilter.java:27)
  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
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)

I have further isolated it to the config.cfc file or loading.

In ColdBox's processColdBoxRequest method, I am dumping <cfdump
var="#cbController.getSettingStructure()#"><cfabort> and I see the
config file from the first site executed on both sites, but, the
AppName is different, but, important settings like interceptors are
from the first application launched.

I've confirmed many of the settings are distinct between the two
config setting structs. However, sub-structs like 'Interceptors' are
from the first application.

Puzzeling...

THis is an issue with coldfusion as it caches the web server paths. Look in the cf admin for “cache web server paths” make sure it is unchecked.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

It is unchecked.

Verified on an associate’s machine his setting is also unchecked.

Thanks for your help.