After updating to Lucee 7 we are seeing ClassNotFoundException errors in the log several times a day. They almost always point at one .cfm file that is cfincluded by a number of our scheduled tasks (which run concurrently).
The request still returns 200 - this is an internal cache miss that Lucee recovers from. Looking at PageSourceImpl.loadPhysical: when the in-memory page has been evicted but the .class file still exists, Lucee first tries to reload it by the class name it cached earlier (pcn), which carries a compile id like $cf$97bg. Once the PhysicalClassLoader generation has been swapped out, that id is gone (the file on disk is base-named, the id only ever lives in the classloader), so the lookup throws - and Lucee catches it, logs it at ERROR, then recovers by recompiling.
Example error:
"ERROR","ajp-nio-127.0.0.1-8009-exec-94","06/11/2026","08:50:30","http://mysite:80","compile","sched.includes.setupinputdata_cfm$cf$97bgjava.lang.ClassNotFoundException: schedules.includes.setupinputdata_cfm$cf$97bg
at lucee.commons.lang.PhysicalClassLoader.loadClass(PhysicalClassLoader.java:326)
at lucee.commons.lang.PhysicalClassLoader.loadClass(PhysicalClassLoader.java:197)
at lucee.runtime.MappingImpl.loadClass(MappingImpl.java:281)
at lucee.runtime.MappingImpl.getPhysicalClass(MappingImpl.java:294)
at lucee.runtime.PageSourceImpl.loadPhysical(PageSourceImpl.java:345)
at lucee.runtime.PageSourceImpl.loadPageThrowTemplateException(PageSourceImpl.java:183)
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:1117)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1121)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1019)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:1000)
at sched.step1_cfm$cf$97be.call(/sched/step1.cfm:11)
This looks like the same situation as LDEV-6385 (form scope parse failures demoted ERROR→DEBUG in 7.0.5.20). Both ClassNotFoundException catch blocks in PageSourceImpl.loadPhysical do:
LogUtil.log(config, “compile”, cnfe); // defaults to ERROR
Could these be demoted to DEBUG the same way?
LogUtil.log(config, “compile”, cnfe, Log.LEVEL_DEBUG, “application”);
I believe this commit will solve it: Change ClassNotFoundException logging to DEBUG level · CXW-Ryan-Stille/Lucee@28d5f3b · GitHub
OS: Windows Server
Java Version: 21.0.11
Lucee Version: 7.0.3.43