Recurring error: Variable APPLICATION is undefined

463 views
Skip to first unread message

David Belanger

unread,
Jul 25, 2018, 4:15:00 PM7/25/18
to CFWheels
I've been seeing a weird reoccurring error in a CFWheels 2.0.1.  This error is recurring and I believe it happens on every session start.

The error is:

"Unable to duplicate a ColdFusion Component.coldfusion.runtime.UndefinedVariableException: Variable APPLICATION is undefined. The specific sequence of files included or processed is: '', line: 156" 

seems to happen on every session start.

First, notice that there's no filename, just a line number...  So, I dug into the full error breakdown and saw that it seems to happen after a call to the injection CFC on line 5.  I believe this is choking on the structKeyExists test on the APPLICATION variable.  I'd like to offer a solution but previous calls to the controller CFC seemed to have gone through (and they too use the APPLICATION variable...).  

Has anybody else seen this?  Does anyone have an idea of why this is happening?

"Error","scheduler-1","07/25/18","06:21:08","","Unable to duplicate a ColdFusion Component.coldfusion.runtime.UndefinedVariableException: Variable APPLICATION is undefined. The specific sequence of files included or processed is: '', line: 156 "

coldfusion.runtime.ObjectDuplicator$UnableToDuplicateCFCException: Unable to duplicate a ColdFusion Component.
at coldfusion.runtime.TemplateProxy.duplicate(TemplateProxy.java:2507)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:125)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.Struct.duplicate(Struct.java:210)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:102)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.Struct.duplicate(Struct.java:210)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:102)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:142)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:142)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.CFPage.Duplicate(CFPage.java:6698)
at cfcfml2ecfm2083540057$func$INVOKE.runFunction(Z:\MYPROJECTDIRECTORY\wheels\global\cfml.cfm:156)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3483)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3464)
at cfcfml2ecfm2083540057$func$SIMPLELOCK.runFunction(Z:\MYPROJECTDIRECTORY\wheels\global\cfml.cfm:33)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3483)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3464)
at cfonsessionend2ecfm1960512997$funcONSESSIONEND.runFunction(Z:\MYPROJECTDIRECTORY\wheels\events\onsessionend.cfm:5)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:650)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:596)
at coldfusion.cfc.CFCProxyFilter.invokeAppEvent(CFCProxyFilter.java:102)
at coldfusion.cfc.CFCProxyFilter.invoke(CFCProxyFilter.java:43)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.cfc.CFCProxy.doInvoke(CFCProxy.java:328)
at coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:302)
at coldfusion.runtime.AppEventInvoker.onSessionEnd(AppEventInvoker.java:462)
at coldfusion.runtime.SessionTracker.invokeOnSessinEnd(SessionTracker.java:292)
at coldfusion.runtime.SessionTracker.cleanUp(SessionTracker.java:275)
at coldfusion.runtime.SessionTracker.access$000(SessionTracker.java:43)
at coldfusion.runtime.SessionTracker$SessionCleanUpAgent.run(SessionTracker.java:484)
at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:260)
at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)
Caused by: coldfusion.runtime.UndefinedVariableException: Variable APPLICATION is undefined.
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:351)
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:330)
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:317)
at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1798)
at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1760)
at cfinjection2ecfm814284297.runPage(Z:\MYPROJECTDIRECTORY\wheels\plugins\standalone\injection.cfm:5)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3696)
at cfController2ecfc530171244.runPage(Z:\MYPROJECTDIRECTORY\wheels\Controller.cfc:5)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:542)
at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
at coldfusion.runtime.TemplateProxyFactory.resolveNameForDuplicate(TemplateProxyFactory.java:168)
at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:47)
at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:72)
at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:68)
at coldfusion.runtime.TemplateProxy.duplicate(TemplateProxy.java:2495)
... 56 more
"Error","scheduler-0","07/25/18","06:26:16","","Unable to duplicate a ColdFusion Component.coldfusion.runtime.UndefinedVariableException: Variable APPLICATION is undefined. The specific sequence of files included or processed is: '', line: 156 "
coldfusion.runtime.ObjectDuplicator$UnableToDuplicateCFCException: Unable to duplicate a ColdFusion Component.
at coldfusion.runtime.TemplateProxy.duplicate(TemplateProxy.java:2507)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:125)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.Struct.duplicate(Struct.java:210)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:102)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.Struct.duplicate(Struct.java:210)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:102)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:142)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:142)
at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
at coldfusion.runtime.CFPage.Duplicate(CFPage.java:6698)
at cfcfml2ecfm2083540057$func$INVOKE.runFunction(Z:\MYPROJECTDIRECTORY\wheels\global\cfml.cfm:156)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3483)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3464)
at cfcfml2ecfm2083540057$func$SIMPLELOCK.runFunction(Z:\MYPROJECTDIRECTORY\wheels\global\cfml.cfm:33)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3483)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3464)
at cfonsessionend2ecfm1960512997$funcONSESSIONEND.runFunction(Z:\MYPROJECTDIRECTORY\wheels\events\onsessionend.cfm:5)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:234)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:650)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:596)
at coldfusion.cfc.CFCProxyFilter.invokeAppEvent(CFCProxyFilter.java:102)
at coldfusion.cfc.CFCProxyFilter.invoke(CFCProxyFilter.java:43)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.cfc.CFCProxy.doInvoke(CFCProxy.java:328)
at coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:302)
at coldfusion.runtime.AppEventInvoker.onSessionEnd(AppEventInvoker.java:462)
at coldfusion.runtime.SessionTracker.invokeOnSessinEnd(SessionTracker.java:292)
at coldfusion.runtime.SessionTracker.cleanUp(SessionTracker.java:275)
at coldfusion.runtime.SessionTracker.access$000(SessionTracker.java:43)
at coldfusion.runtime.SessionTracker$SessionCleanUpAgent.run(SessionTracker.java:484)
at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:260)
at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)
Caused by: coldfusion.runtime.UndefinedVariableException: Variable APPLICATION is undefined.
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:351)
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:330)
at coldfusion.runtime.CfJspPage._get(CfJspPage.java:317)
at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1798)
at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1760)
at cfinjection2ecfm814284297.runPage(Z:\MYPROJECTDIRECTORY\wheels\plugins\standalone\injection.cfm:5)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3696)
at cfController2ecfc530171244.runPage(Z:\MYPROJECTDIRECTORY\wheels\Controller.cfc:5)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:542)
at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
at coldfusion.runtime.TemplateProxyFactory.resolveNameForDuplicate(TemplateProxyFactory.java:168)
at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:47)
at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:72)
at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:68)
at coldfusion.runtime.TemplateProxy.duplicate(TemplateProxy.java:2495)
... 56 more


Per Djurner

unread,
Jul 25, 2018, 4:32:39 PM7/25/18
to cfwh...@googlegroups.com
So it looks like it's failing here, right?

Maybe put a try / catch around that and dump out what's in the "arguments" variable when it's failing?

You need to restart Wheels or CF after adding the code.

--
You received this message because you are subscribed to the Google Groups "CFWheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at https://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/d/optout.

David Belanger

unread,
Jul 26, 2018, 8:45:00 AM7/26/18
to CFWheels
OK, the dump isn't actually seen but I've got a new error now:

"Error","scheduler-0","07/26/18","06:42:15","","Cannot access array element at position 1.The array has 0 indexes. Valid positions are from 1 to 0. The specific sequence of files included or processed is: '', line: 163 "

David Belanger

unread,
Jul 26, 2018, 8:47:11 AM7/26/18
to CFWheels
Sorry, posted this before I told you what that line is in CFML:

<cfset arrayDeleteAt(request.$wheelsInvoked, 1)>

David Belanger

unread,
Jul 26, 2018, 3:27:00 PM7/26/18
to CFWheels
Per,

I've managed to dump to the arguments to file:

arguments = {
$LOCKED = true,
APPLICATIONSCOPE = {THE APPLICATION VARIABLES},
RETURNVARIABLE = local.rv,
SESSIONSCOPE = {THE SESSION INFO},
method = $runOnSessionEnd
}

The application scope and session scope are full of private info however if there's a specific key you need, I can get it for you.  What I do think is important is that this seems to happen on the method "$runOnSessionEnd".

David Belanger

unread,
Jul 26, 2018, 4:57:10 PM7/26/18
to CFWheels
And I was able to dump the very specific error.  Again, it all stems from the onSessionEnd:

coldfusion.runtime.UndefinedVariableException: Variable APPLICATION is undefined.
 at coldfusion.runtime.CfJspPage._get(CfJspPage.java:351)
 at coldfusion.runtime.CfJspPage._get(CfJspPage.java:330)
 at coldfusion.runtime.CfJspPage._get(CfJspPage.java:317)
 at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1798)
 at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1760)
 at cfinjection2ecfm2053640414.runPage(Z:\MYPROJECTDIRECTORY\wheels\plugins\standalone\injection.cfm:5)
 at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
 at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:737)
 at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
 at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3696)
 at cfModel2ecfc394272461.runPage(Z:\MYPROJECTDIRECTORY\wheels\Model.cfc:4)
 at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:253)
 at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
 at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:542)
 at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
 at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
 at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:251)
 at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:377)
 at coldfusion.runtime.TemplateProxyFactory.resolveNameForDuplicate(TemplateProxyFactory.java:168)
 at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:47)
 at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:72)
 at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:68)
 at coldfusion.runtime.TemplateProxy.duplicate(TemplateProxy.java:2495)
 at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:125)
 at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
 at coldfusion.runtime.Struct.duplicate(Struct.java:210)
 at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:102)
 at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
 at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:142)
 at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
 at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:142)
 at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:78)
 at coldfusion.runtime.CFPage.Duplicate(CFPage.java:6698)
 at cfcfml2ecfm631766577$func$INVOKE.runFunction(Z:\MYPROJECTDIRECTORY\wheels\global\cfml.cfm:157)
 at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
 at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
 at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
 at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
 at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
 at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
 at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
 at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3483)
 at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3464)
 at cfcfml2ecfm631766577$func$SIMPLELOCK.runFunction(Z:\MYPROJECTDIRECTORY\wheels\global\cfml.cfm:33)
 at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:492)
 at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
 at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:425)
 at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:388)
 at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
 at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:339)
 at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:538)
 at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3483)
 at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3464)
 at cfonsessionend2ecfm543644058$funcONSESSIONEND.runFunction(Z:\MYPROJECTDIRECTORY\wheels\events\onsessionend.cfm:5)

Per Djurner

unread,
Jul 27, 2018, 5:42:10 AM7/27/18
to cfwh...@googlegroups.com
I don't have a way to test this right now but I'm pretty sure the root issue is that the application scope is not available in the onSessionEnd life cycle hook in CFML. Therefore, when wheels\plugins\standalone\injection.cfm tries to look up a key in the application scope, it fails.
What might be available is the applicationScope argument, so one way to fix it would be to change wheels\plugins\standalone\injection.cfm to use that when the application scope is not available. 

By the way, I am assuming here that you have a model("something") call in your events/onsessionend.cfm file, is that correct?

--

David Belanger

unread,
Jul 27, 2018, 8:17:32 AM7/27/18
to CFWheels

Thanks the weird thing Per, my onsessionend.cfm file is empty.  But it looks like standalone/injection.cfm is called on every request (including ending the session).

The applicationScope is definitely available so I might try some logic there.

David Belanger

unread,
Jul 27, 2018, 10:59:46 AM7/27/18
to CFWheels

Per Djurner

unread,
Jul 27, 2018, 11:15:55 AM7/27/18
to cfwh...@googlegroups.com
But what if you actually have a plug-in that does something with models on session end, this change would make that call not run then I think (?).
--

David Belanger

unread,
Jul 27, 2018, 1:16:12 PM7/27/18
to CFWheels

Everything in the model.cfc is being run except for the last line:

include "plugins/standalone/injection.cfm

The only two things in the injection call are 2 if statements that look in the application scope for
a) $wheels or wheels key 
b) mixins

So basically, I believe the proper procedure should be no application scope, no need for this include.

Per Djurner

unread,
Jul 27, 2018, 2:16:04 PM7/27/18
to cfwh...@googlegroups.com
Just read the pull request in more detail.
I think you are correct.

Merged.

Thanks!

--

David Belanger

unread,
Jul 30, 2018, 9:20:41 AM7/30/18
to CFWheels
Per, the error is still happening.

But this time it looks like the injection.cfm file is being call by the wheels\Controller.cfc and that's causing the error.  It's still onSessionEnd so the error is still the same.

I'll make a new pull request to move isDefined to the place where the variable is actually being used (which I should have done in the first place).

I have this live in production now and so far the error has no happened again.

Brandon Shea

unread,
Oct 11, 2018, 1:52:36 PM10/11/18
to CFWheels
Thanks David for this find. I was having a similar issue, and your fix resolved it. 
Reply all
Reply to author
Forward
0 new messages