Skip to content

Element wo is undefined in a Java object of type class [Ljava.lang.String #3379

Closed

Description

@mikegrogan

Describe the bug

This has been coming up after moving to Wheels4. Wondering if others see it as well?

Stack trace below:

"Error","ajp-nio-127.0.0.1-8022-exec-5","08/18/26","11:30:07","admin","Element wo is undefined in a Java object of type class [Ljava.lang.String;. The specific sequence of files included or processed is: [...truncated...]\public\Application.cfc, line: 102"
coldfusion.runtime.UndefinedElementException: Element wo is undefined in a Java object of type class [Ljava.lang.String;.
	at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:2855)
	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2778)
	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2759)
	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2722)
	at cfApplication2ecfc544280328$funcONAPPLICATIONEND.runFunction([...truncated...]\public\Application.cfc:102)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:328)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:921)
	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:331)
	at coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:305)
	at coldfusion.runtime.AppEventInvoker.onApplicationEnd(AppEventInvoker.java:263)
	at coldfusion.runtime.ApplicationScopeTracker.invokeOnApplicationEnd(ApplicationScopeTracker.java:133)
	at coldfusion.runtime.ApplicationScopeTracker.fireBeforeApplicationStop(ApplicationScopeTracker.java:218)
	at coldfusion.runtime.ApplicationScopeTracker.cleanUp(ApplicationScopeTracker.java:164)
	at coldfusion.runtime.ApplicationScopeTracker.stopApplication(ApplicationScopeTracker.java:200)
	at coldfusion.runtime.CFPage.ApplicationStop(CFPage.java:16712)
	at cfApplication2ecfc544280328$func$HANDLERESTARTAPPREQUEST.runFunction([...truncated...]\public\Application.cfc:337)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:726)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4048)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4012)
	at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:472)
	at cfGlobal2ecfc1469752001$func$INVOKE.runFunction([...truncated...]\vendor\wheels\Global.cfc:358)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:726)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4792)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4773)
	at cfGlobal2ecfc1469752001$func$SIMPLELOCK.runFunction([...truncated...]\vendor\wheels\Global.cfc:41)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:726)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4048)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4012)
	at cfApplication2ecfc544280328$funcONREQUESTSTART.runFunction([...truncated...]\public\Application.cfc:221)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:328)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503)
	at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115)
	at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:286)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:562)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:81)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
	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:231)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:201)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:170)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:88)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:534)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:129)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:86)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:71)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:363)
	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:459)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:71)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:1344)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:2089)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:74)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:976)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:494)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:80)
	at java.base/java.lang.Thread.run(Thread.java:833)

To Reproduce
Found in Adobe Coldfusion 2023 error logs. I don't know exactly how it's triggering. That's the main problem. Usually it's fine going into the end of the day. And then overnight at some point it starts happening and the whole site starts erroring. It's production, so a reload=true didn't work. I had to restart the ColdFusion service and then it starts behaving normally again.

I'm guessing it's maybe a timeout issue and application.wo is no longer found? Maybe it's not capturing that fact and re-initializing itself? This doesn't happen every day though, so a little confusing. If I can pinpoint it better I'll attach more information.

Expected behavior
application.wo should be defined. It shouldn't error out. Or make sure it gets re-initialized.

Additional context

  • Adobe Coldfusion 2023
  • IIS running in front of it on a Windows 2022 server
  • Wheels 4.0.5

Activity

  1. wheels-bot commented on Aug 18, 2026

    @wheels-bot
    Contributor

    Wheels Bot — Triage

    Classified as bug.

    The stack trace pins this down: onRequestStart triggers a restart via $handleRestartAppRequest() (Application.cfc:337), which calls applicationStop(). Adobe CF fires onApplicationEnd synchronously during that teardown, and the event handler unconditionally dereferences bare application.wo.$include(...). During shutdown on Adobe CF 2023, bare application.wo no longer resolves to the Global component — CF resolves the name against a stale/torn-down scope and finds a Java String[] ([Ljava.lang.String;), hence Element wo is undefined in a Java object of type class [Ljava.lang.String;. That explains the intermittent, restart-associated symptom (a ?reload or environment-switch restart that fires while the scope is being reclaimed), and why only a full CF service restart clears it.

    Suspected layer

    config — application-lifecycle event handlers in the generated Application.cfc. The offending code is onApplicationEnd() in cli/lucli/templates/app/public/Application.cfc (around line 159 in the current template; line 102 in the reporter's copy). See .ai/wheels/troubleshooting/common-errors.md for related lifecycle patterns.

    Fix sketch

    Inside onApplicationEnd(), stop dereferencing the live application scope — the only reliable reference during teardown is the passed-in arguments.applicationScope. Route the $include call through arguments.applicationScope.wo (mirroring how the existing $wheelsBrowserLauncher cleanup already reads from arguments.applicationScope), and guard the whole block with StructKeyExists(arguments.applicationScope, "wo") so a partially reclaimed scope degrades to a no-op instead of a hard error. Because the fix lives in the CLI-generated template, only newly scaffolded apps pick it up automatically; existing apps need the same edit applied to their public/Application.cfc.

    Confidence: medium

    The stack trace makes the failing line and fix shape unambiguous, but the trigger is Adobe-CF-specific teardown behavior (a cross-engine concern that differs from Lucee/BoxLang) and the report is intermittent/not reliably reproducible — the auto-downgrade rule for cross-engine concerns caps this at medium.

  2. wheels-bot commented on Aug 18, 2026

    @wheels-bot
    Contributor

    Wheels Bot — Fix proposed

    Draft PR: #3380

    Spec: vendor/wheels/tests/specs/cli/OnApplicationEndScopeGuardSpec.cfc — failing → passing
    Implementation:

    • cli/lucli/templates/app/public/Application.cfc (the wheels new template)
    • public/Application.cfc (demo app)
    • examples/starter-app/public/Application.cfc, examples/tweet/public/Application.cfc

    onApplicationEnd() now invokes the Wheels global through the passed-in arguments.applicationScope.wo (guarded with StructKeyExists) instead of the live application.wo, so Adobe CF 2023's unreliable application scope during applicationStop() teardown can no longer surface Element wo is undefined in a Java object of type class [Ljava.lang.String;. Existing apps should apply the same one-region edit to their own public/Application.cfc.

    Note: this hardens the exact handler from your stack trace so the crash no longer cascades, but the underlying trigger for the overnight restart isn't reliably reproducible — the PR uses Refs #3379 (not Closes) so the issue stays open for that follow-up. If you can pin down what fires the restart overnight, please add it here.

    A human review is required before merge. The Reviewer will weigh in shortly. Doc updates (MDX guides, .ai/wheels/, CLAUDE.md) are handled separately by bot-update-docs.yml.

  3. bpamiri commented on Aug 20, 2026

    @bpamiri
    Collaborator

    Thanks Mike — the stack is enough to see what's going on.

    Adobe 2023 fires onApplicationEnd synchronously during applicationStop(). That's the reload / overnight restart path. By then the live application scope is already being reclaimed, so bare application.wo no longer points at the Global component — CF resolves wo against a leftover String[] and you get exactly this error. A reload=true can make it worse; a full CF service restart is the only recovery because it rebuilds the scope from scratch.

    We're changing the generated onApplicationEnd to call through arguments.applicationScope.wo (guarded with StructKeyExists) instead of live application.wo. That's in #3380. New apps get it automatically; existing ones need the same one-region edit in public/Application.cfc.

    That stops the crash cascading. The overnight trigger itself still isn't pinned — if you catch what fires the restart (timeout, recycle, env switch), drop it here and we'll go after that too.

  4. mikegrogan commented on Aug 20, 2026

    @mikegrogan
    ContributorAuthor

    Thanks @bpamiri. I have a trigger in Splunk to notify me when this error happens. It seems to happen all through out the day. I just didn't notice it for a bit. But usually the wheels 4 app is still running w/o any apparent issue. Not sure why it completely crashed the application earlier in the week. Maybe something else happened at a similar time. Either way, glad to get a fix coming soon. Thanks for all the hard work!

  5. bpamiri commented on Aug 20, 2026

    @bpamiri
    Collaborator

    Thanks Mike — and good to know Splunk is seeing it through the day even when the app stays up. That fits the teardown path: the handler can throw without always taking the whole site down.

    The guard is on develop now (#3381; bot draft was #3380). New apps from current wheels new get it. Not in 4.0.5, and we cannot patch an already-generated public/Application.cfc from vendor.

    For an existing 4.0.5 app, replace the onApplicationEnd body that calls application.wo.$include(...) with:

    public void function onApplicationEnd(struct ApplicationScope) {
        if (StructKeyExists(arguments.applicationScope, "$wheelsBrowserLauncher")) {
            try { arguments.applicationScope.$wheelsBrowserLauncher.release(); } catch (any e) {}
        }
        if (
            StructKeyExists(arguments.applicationScope, "wo")
            && StructKeyExists(arguments.applicationScope, "wheels")
            && StructKeyExists(arguments.applicationScope.wheels, "eventPath")
        ) {
            arguments.applicationScope.wo.$include(
                template = "../../#arguments.applicationScope.wheels.eventPath#/onapplicationend.cfm",
                argumentCollection = arguments
            );
        }
    }

    Key bits: arguments.applicationScope.wo, never live application.wo, and StructKeyExists before the dereference. Closing against #3381. Reopen if Splunk still lights up after the edit.

  6. mikegrogan commented on Aug 20, 2026

    @mikegrogan
    ContributorAuthor

    Testing and moving to production. Will follow up in a few days

  7. mikegrogan commented on Aug 21, 2026

    @mikegrogan
    ContributorAuthor

    Hi @bpamiri, I tested updating onapplicationend() in public/application.cfc with what's shown above. Unfortunately it didn't help. What's odd is I have multiple wheels sites, and only one seems to be erroring. I'm comparing differences and not coming up with much. When I said splunk earlier, I really just meant the Coldfusion exception logs that get loaded in there.

    So previously the error seems to be triggered from onsessionend in the public/application.cfc. Specifically the application.wo.$simpleLock() call.

      public void function onSessionEnd(struct SessionScope, struct ApplicationScope){
        local.lockName = "reloadLock" & this.name;
    
        arguments.componentReference = "wheels.events.EventMethods";
        application.wo.$simpleLock(
          name = local.lockName,
          execute = "$runOnSessionEnd",
          executeArgs = arguments,
          type = "readOnly",
          timeout = 180
        );
      }
    

    It's still erroring on the same function. The onapplicationend update might not have been the right function to update?

    It's currently erroring every 1-3 minutes over and over for onSessionEnd

    "Error","scheduler-0","08/21/26","09:38:54","","Element wo is undefined in a Java object of type class [Ljava.lang.String;. The specific sequence of files included or processed is: '', line: 147"
    coldfusion.runtime.UndefinedElementException: Element wo is undefined in a Java object of type class [Ljava.lang.String;.
    	at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:2855)
    	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2778)
    	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2759)
    	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2722)
    	at cfApplication2ecfc1703714259$funcONSESSIONEND.runFunction(...truncated...\public\Application.cfc:147)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
    	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:328)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:921)
    	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:331)
    	at coldfusion.cfc.CFCProxy.invoke(CFCProxy.java:305)
    	at coldfusion.runtime.AppEventInvoker.onSessionEnd(AppEventInvoker.java:489)
    	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)
    

    Just for completeness, I checked the onsessionstart.cfm and onsessionend.cfm and nothing is in there. I do have something in onapplicationstart.cfm, but it seems to be working fine. It's the same as another wheels application too and it's not causing issues there.

  8. bpamiri commented on Aug 21, 2026

    @bpamiri
    Collaborator

    Thanks Mike — that stack is the missing piece.

    The onApplicationEnd guard was the right fix for the original dump (applicationStop() → onApplicationEnd). What's firing every 1–3 minutes is a sibling: Adobe's session reaper (SessionTracker.SessionCleanUpAgent on scheduler-0) calling onSessionEnd, which still does live application.wo.$simpleLock(...). Same torn-down scope, same String[], different handler. Empty onsessionend.cfm doesn't matter — the crash is in the generated handler before that include ever runs.

    onSessionEnd already receives the application scope as its second argument. Same pattern as the last paste:

    public void function onSessionEnd(struct SessionScope, struct ApplicationScope) {
        local.lockName = "reloadLock" & this.name;
    
        if (StructKeyExists(arguments.applicationScope, "wo")) {
            arguments.componentReference = "wheels.events.EventMethods";
            arguments.applicationScope.wo.$simpleLock(
                name = local.lockName,
                execute = "$runOnSessionEnd",
                executeArgs = arguments,
                type = "readOnly",
                timeout = 180
            );
        }
    }

    If wo is already gone, this becomes a no-op instead of an exception every couple of minutes. I'll put the same guard in the wheels new template — develop still has the live application.wo call in onSessionEnd — so new apps don't inherit it.

    One of several sites throwing is consistent with this: the reaper only hits apps whose sessions are actually expiring. Reopening this against that handler.

  9. mikegrogan commented on Aug 25, 2026

    @mikegrogan
    ContributorAuthor

    Thanks again @bpamiri. That seems to have fixed it. I have no sign of this issue in the Coldfusion exception log for days now. I guess I'm naively wondering why applicationScope.wo wouldn't be set on a running wheels site, but I haven't closely looked at the code in a few weeks. Just happy it seems to be working well.

  10. mikegrogan commented on Aug 25, 2026

    @mikegrogan
    ContributorAuthor

    The logs are still bringing up more element wo is undefined issues. Still wondering how this happens where it's undefined.

    Line 310 for me is local.requestTimeout = application.wo.$getRequestTimeout() + 30;

    public void function onError(any Exception, string EventName){
        try{
          injector = new wheels.Injector("wheels.Bindings");
          application.wo = injector.getInstance("global");
    
          // Make exception available to the event template
          request.wheels = request.wheels ?: {};
          request.wheels.exception = Exception;
          request.wheels.eventName = EventName;
    
          // Run early error event if it exists
          application.wo.$include(template = "/wheels/events/onerror/onerrorstart.cfm");
        }
        catch (any e){
          // Must never break error handling
        }
    
        // In case the error was caused by a timeout we have to add extra time for error handling.
        // We have to check if onErrorRequestTimeout exists since errors can be triggered before the application.wheels struct has been created.
       `local.requestTimeout = application.wo.$getRequestTimeout() + 30;
        if (structKeyExists(application, "wheels") && structKeyExists(application.wheels, "onErrorRequestTimeout")){
          local.requestTimeout = application.wheels.onErrorRequestTimeout;
        }
        setting requestTimeout=local.requestTimeout;
    
        application.wo.$initializeRequestScope();
        arguments.componentReference = "wheels.events.EventMethods";
    
        local.lockName = "reloadLock" & this.name;
        local.rv = application.wo.$simpleLock(
          name = local.lockName,
          execute = "$runOnError",
          executeArgs = arguments,
          type = "readOnly",
          timeout = 180
        );
        writeOutput(local.rv);
      }
    

    Error log

    "Error","ajp-nio-127.0.0.1-8022-exec-163","08/25/26","13:13:26","Element wo is undefined in a Java object of type class [Ljava.lang.String;. The specific sequence of files included or processed is: ...truncated...\public\index.cfm, line: 310"
    coldfusion.runtime.UndefinedElementException: Element wo is undefined in a Java object of type class [Ljava.lang.String;.
    	at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:2855)
    	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2778)
    	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2759)
    	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:2722)
    	at cfApplication2ecfc400305815$funcONERROR.runFunction(...truncated...\public\Application.cfc:310)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
    	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:328)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503)
    	at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115)
    	at coldfusion.runtime.AppEventInvoker.onError(AppEventInvoker.java:524)
    	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:658)
    	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
    	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    	at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
    	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
    	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
    	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:81)
    	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
    	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:231)
    	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:201)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
    	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
    	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:170)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:88)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:534)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:129)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:86)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:71)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:363)
    	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:459)
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:71)
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:1344)
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:2089)
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:74)
    	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:976)
    	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:494)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:80)
    	at java.base/java.lang.Thread.run(Thread.java:833)
    
  11. mikegrogan commented on Aug 25, 2026

    @mikegrogan
    ContributorAuthor

    At around the same time I also saw this error. Doing a reload=true didn't work. I had to restart the CF service.

    What's odd is public/index.cfm is like 5 lines long. Not sure why it's saying 358.

    I'm still on wheels 4.0.5. I'll move up to 4.0.6 soon to see if it helps.

    ##Coldfusion exception log

    "Error","ajp-nio-127.0.0.1-8022-exec-153","08/25/26","13:13:22","Could not find the ColdFusion component or interface EventHandlerInterface.Ensure that the name is correct and that the component or interface exists. The specific sequence of files included or processed is: ...truncated...\public\index.cfm, line: 358"
    coldfusion.runtime.CfJspPage$NoSuchTemplateException: Could not find the ColdFusion component or interface EventHandlerInterface.
    	at coldfusion.runtime.TemplateProxyFactory.getResolvedFile(TemplateProxyFactory.java:1576)
    	at coldfusion.runtime.TemplateProxyFactory.getResolvedFile(TemplateProxyFactory.java:1428)
    	at coldfusion.runtime.TemplateProxyFactory.resolveSuperPath(TemplateProxyFactory.java:828)
    	at coldfusion.runtime.ComponentTemplateProxyCache.getTemplateProxyFromChildPath(ComponentTemplateProxyCache.java:108)
    	at coldfusion.runtime.TemplateProxy.hasDefaultFunctionConflict(TemplateProxy.java:1446)
    	at coldfusion.runtime.TemplateProxy.verifyInterfacesImpl(TemplateProxy.java:2286)
    	at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:93)
    	at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:69)
    	at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:56)
    	at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:470)
    	at cfGlobal2ecfc1313780065$func$INVOKE.runFunction(...truncated...\vendor\wheels\Global.cfc:358)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
    	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:726)
    	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4792)
    	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:4773)
    	at cfGlobal2ecfc1313780065$func$SIMPLELOCK.runFunction(...truncated...\vendor\wheels\Global.cfc:41)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
    	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:726)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762)
    	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4048)
    	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4012)
    	at cfApplication2ecfc400305815$funcONERROR.runFunction(...truncated...\public\Application.cfc:325)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
    	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:328)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503)
    	at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115)
    	at coldfusion.runtime.AppEventInvoker.onError(AppEventInvoker.java:524)
    	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:658)
    	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
    	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    	at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
    	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
    	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
    	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:81)
    	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
    	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:231)
    	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:201)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
    	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)
    	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:170)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:88)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:534)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:129)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:86)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:71)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:363)
    	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:459)
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:71)
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:1344)
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:2089)
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:74)
    	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:976)
    	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:494)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:80)
    	at java.base/java.lang.Thread.run(Thread.java:833)
    
  12. mikegrogan commented on Aug 25, 2026

    @mikegrogan
    ContributorAuthor

    I don't want to hijack this thread, but it all seems related. I did a box install and upgraded on of my wheels sites to 4.0.6. I then took the public/application.cfc and manually updated it too from https://github.com/wheels-dev/wheels/blob/v4.0.6/public/Application.cfc.

    When I first load the application (after starting commandbox) I always get this error below. If I simply reload the page it'll load up properly. I don't even need to do a reload=true. I can browse the site like normal.

    to test again, i stop the commandbox server and then start up again. Same error again. Reloading a second time fixes it.

    It seems like something isn't loading in the right order?

    Running: Adobe Coldfusion 2023, Wheels 4.0.6

    The error occurred in ...truncated.../vendor/wheels/events/onapplicationstart.cfc: line 409
    407 : 		// Enable the main GUI Component 408 : 		if (application.$wheels.enablePublicComponent) { 409 : 			application.$wheels.public = application.wo.$createObjectFromRoot(path = "wheels", fileName = "Public", method = "$init"); 410 : 		} 411 :
    

    full stack trace

    
    Stack Trace
    at cfonapplicationstart2ecfc1067709631$func$INIT.runFunction(...truncated.../vendor/wheels/events/onapplicationstart.cfc:409) at cfApplication2ecfc872969530$funcONAPPLICATIONSTART.runFunction(...truncated.../public/Application.cfc:150)
    
    java.util.EmptyStackException
    	at java.base/java.util.Stack.peek(Unknown Source)
    	at java.base/java.util.Stack.pop(Unknown Source)
    	at coldfusion.runtime.NeoPageContext.popSuperScope(NeoPageContext.java:2210)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:694)
    	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:726)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:980)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:762)
    	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4048)
    	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4012)
    	at cfonapplicationstart2ecfc1067709631$func$INIT.runFunction(...truncated...\vendor\wheels\events\onapplicationstart.cfc:409)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
    	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:598)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:328)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503)
    	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4137)
    	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:4100)
    	at cfApplication2ecfc872969530$funcONAPPLICATIONSTART.runFunction(...truncated...\public\Application.cfc:150)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:668)
    	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:561)
    	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:483)
    	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:456)
    	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:328)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:975)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:696)
    	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:503)
    	at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115)
    	at coldfusion.runtime.AppEventInvoker.onApplicationStart(AppEventInvoker.java:238)
    	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:436)
    	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    	at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)
    	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
    	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
    	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:97)
    	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
    	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
    	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:231)
    	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)
    	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
    	at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:56)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
    	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    	at runwar.undertow.SSLCertHeaderHandler.handleRequest(SSLCertHeaderHandler.java:161)
    	at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:252)
    	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:177)
    	at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:186)
    	at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImplSetup(RequestDispatcherImpl.java:134)
    	at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:97)
    	at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:54)
    	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
    	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
    	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    	at runwar.undertow.SSLCertHeaderHandler.handleRequest(SSLCertHeaderHandler.java:161)
    	at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
    	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
    	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:75)
    	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:270)
    	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
    	at io.undertow.servlet.handlers.ServletInitialHandler$1.call(ServletInitialHandler.java:129)
    	at io.undertow.servlet.handlers.ServletInitialHandler$1.call(ServletInitialHandler.java:126)
    	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
    	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:250)
    	at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:170)
    	at io.undertow.server.handlers.HttpContinueReadHandler.handleRequest(HttpContinueReadHandler.java:69)
    	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    	at runwar.undertow.WelcomeFileHandler.handleRequest(WelcomeFileHandler.java:49)
    	at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:104)
    	at runwar.undertow.SiteDeployment$1.handleRequest(SiteDeployment.java:169)
    	at io.undertow.predicate.PredicatesHandler.handleRequest(PredicatesHandler.java:97)
    	at io.undertow.predicate.PredicatesHandler.handleRequest(PredicatesHandler.java:97)
    	at io.undertow.predicate.PredicatesHandler$DoneHandlerBuilder$1$1.handleRequest(PredicatesHandler.java:233)
    	at io.undertow.predicate.PredicatesHandler.handleRequest(PredicatesHandler.java:113)
    	at io.undertow.server.handlers.SetAttributeHandler.handleRequest(SetAttributeHandler.java:119)
    	at io.undertow.server.handlers.builder.RewriteHandlerBuilder$2$1.handleRequest(RewriteHandlerBuilder.java:92)
    	at io.undertow.predicate.PredicatesHandler.handleRequest(PredicatesHandler.java:113)
    	at io.undertow.predicate.PredicatesHandler.handleRequest(PredicatesHandler.java:113)
    	at io.undertow.server.handlers.SetAttributeHandler.handleRequest(SetAttributeHandler.java:119)
    	at io.undertow.predicate.PredicatesHandler.handleRequest(PredicatesHandler.java:113)
    	at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:72)
    	at io.undertow.server.handlers.accesslog.AccessLogHandler.handleRequest(AccessLogHandler.java:148)
    	at runwar.undertow.LifecyleHandler.handleRequest(LifecyleHandler.java:145)
    	at runwar.undertow.SiteDeployment$4.handleRequest(SiteDeployment.java:360)
    	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:395)
    	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:931)
    	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
    	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
    	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
    	at java.base/java.lang.Thread.run(Unknown Source)
    
  13. mikegrogan commented on Aug 25, 2026

    @mikegrogan
    ContributorAuthor

    Yeah. Discarded all the changed files from the upgrade to 4.0.6 and went back to 4.0.5. Issue went away.

  14. bpamiri commented on Aug 26, 2026

    @bpamiri
    Collaborator

    Thanks Mike — that's a different report from the torn-down application.wo stacks.

    The first-boot EmptyStackException at onapplicationstart.cfc:409 ($createObjectFromRoot → Public.$init) on Adobe CF 2023 + CommandBox, gone after you discarded the 4.0.6 files, looks like a real 4.0.6 regression. That line is the Public GUI init. In 4.0.5 Public.$init is include helpers + return. In 4.0.6 and current develop it also calls $scanAndPromoteIncludedGlobals(). The call site itself existed in 4.0.5 (line 419 there). Adobe's popSuperScope EmptyStack on the first request after a cold start fits an include/super-scope nest during that new $init work; a plain reload compiling a second time would then succeed, which matches what you saw.

    Stay off 4.0.6 on that CommandBox Adobe 2023 app until we isolate it. Don't copy the v4.0.6 tag Application.cfc over the onSessionEnd guard you already have from develop — that file is unrelated to this first-boot stack.

    The 4.0.5 onError wo / EventHandlerInterface pair is still the torn-down scope issue; we'll keep that on its own. Keeping this open.

  15. bpamiri commented on Sep 3, 2026

    @bpamiri
    Collaborator

    Closing this out — all four manifestations are now fixed on develop (shipping in the next release, 4.1.0; none of these were in 4.0.6):

    1. onApplicationEnd torn-down scope — fix(config): route onApplicationEnd through applicationScope.wo to survive Adobe teardown #3380/test(cli): cover every shipped onApplicationEnd handler for #3379 #3381: Application.cfc routes $include through arguments.applicationScope.wo, guarded with StructKeyExists.
    2. onSessionEnd reaper — fix(cli): guard onSessionEnd via applicationScope.wo (#3379) #3394: $simpleLock routes through arguments.applicationScope.wo, guarded with StructKeyExists.
    3. First-boot EmptyStackException (4.0.6 regression) — fix(public): isolate helpers include from $init promote scan #3425: the helpers.cfm include was isolated out of Public.$init so Adobe's include page-context pops before $scanAndPromoteIncludedGlobals() runs (the helper-promote itself is unchanged).
    4. onError torn-down deref — fix(config): harden onError against Adobe applicationScope teardown #3490: the post-guard application.wo.* handling is now wrapped in its own try/catch and degrades to a shared $renderMinimalError() fallback; examples/starter-app and examples/tweet were also brought up to the guarded shape (they still carried the pre-First 15 Minutes tutorial fails. The key [WO] does not exist. #2773 unguarded handler).

    Each fix ships with a structural regression spec. If you still see the error on 4.0.6, that's expected — upgrade to 4.1.0 when it lands.

  16. bpamiri commented on Sep 3, 2026

    @bpamiri
    Collaborator

    One more thing for the upgrade, @mikegrogan — the onError and onSessionEnd fixes live in public/Application.cfc, which a vendor/wheels/-only swap does not touch (the onApplicationEnd guard already shipped in 4.0.6; the onSessionEnd and onError ones are new in 4.1.0). So when you upgrade, also diff your public/Application.cfc against the 4.1.0 template and adopt the guarded handlers — or just run wheels upgrade check, which now flags that drift automatically. Details: https://guides.wheels.dev/v4-0-0/upgrading/manual-upgrades/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions