Application Variables being lost

I’m starting to see some errors that haven’t appeared before. I -think- it’s since I applied the update

I have some code that writes to a text file and is called through

<cfset application.MessageWriter.statusMSG(session.orderType,"Created Article")>

This is part of a long running process and I use it to write to a status window so users can see where things are at.

It will be running along fine and then it will fail with the message that the application variable doesn’t exist.

;key [MESSAGEWRITER] doesn't exist;lucee.runtime.exp.ExpressionException: key [MESSAGEWRITER] doesn't exist

The application doesn’t seem to have hit its timeout which is about the only reason I could think of to lose the variable.

When this first started happening, I thought it might be a file lock issue on the text file and the message was just Lucee being confused but I’m now seeing it in another variable

key [JAVABOT] doesn't exist;lucee.runtime.exp.ExpressionException: key [JAVABOT] doesn't exist

which is a call to some java that does GETs and POSTs.

When these error, my process aborts and has to be restarted…and the variables are fine again. (without resetting the application)

Any idea what could be going on?

I have experienced something like this in a CFWheels application we were trying to run in Lucee. I cannot seem to narrow down what is timing out. It will throw an error and then, like you stated, be fine again. Really frustrated and this is mostly due to my inability to narrow down a reliable cause and research a solution. Your post just stuck out to me today and I thought I would chime in.


Currently Running:

Inspect Templates (CFM/CFC) Once ( Good )
Null Support Partial Support (CFML Default)
Key case Convert to upper case (CFML Default)
Local scope mode Classic (CFML Default)
General Info
Version Lucee
Version Name Velvet
Release date Jul 25, 2017
ColdFusion® compatibility version 2016.0.03.300357
Configuration File /Library/Lucee/config/server/lucee-server/context/lucee-server.xml
OS Mac OS X (10.12.6) 64bit
Remote IP 0:0:0:0:0:0:0:1
Host Name localhost
Servlet Container Apache Tomcat/8.5.16
Java 1.8.0_144 (Oracle Corporation) 64bit
Architecture 64bit

Lucee Error (expression)
Message The key [APPLICATIONNAME] does not exist, only the following keys are available: [$WHEELS].
Stacktrace The Error Occurred in
/Users/PATHTOAPPLICATION/wheels/events/onerror.cfm: line 16
15: $initializeRequestScope();
16: local.lockName = “reloadLock” & application.applicationName;
17: local.rv = $simpleLock(name=local.lockName, execute="$runOnError", executeArgs=arguments, type=“readOnly”, timeout=360);
18: writeOutput(local.rv);

Java Stacktrace lucee.runtime.exp.ExpressionException: The key [APPLICATIONNAME] does not exist, only the following keys are available: [$WHEELS].
at lucee.runtime.type.util.StructSupport.invalidKey(
at lucee.runtime.type.StructImpl.get(
at lucee.runtime.type.UDFImpl.implementation(
at lucee.runtime.type.UDFImpl._call(
at lucee.runtime.ComponentImpl._call(
at lucee.runtime.ComponentImpl._call(
at lucee.runtime.listener.ModernAppListener.onError(
at lucee.runtime.listener.MixedAppListener.onError(
at lucee.runtime.PageContextImpl.execute(
at lucee.runtime.PageContextImpl._execute(
at lucee.runtime.PageContextImpl.executeCFML(
at lucee.runtime.engine.Request.exe(
at lucee.runtime.engine.CFMLEngineImpl._service(
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(
at lucee.loader.servlet.CFMLServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.tomcat.websocket.server.WsFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.ajp.AjpProcessor.service(
at org.apache.coyote.AbstractProcessorLight.process(
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
at org.apache.tomcat.util.threads.TaskThread$

Timestamp 8/7/17 2:20:14 PM PDT