Uploaded image for project: 'Lucee Development'
  1. LDEV-1058

Lucee without java agent: get missing include errors for tmp files used in AOP


    • Type: Bug
    • Status: Deployed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s:
    • Labels:
    • Sprint:


      This error occurs when a temporary file is written down within a particular mapping (e.g. /coldbox), used to read in some dynamic source code and then deleted. All is well until another template within the same mapping is recompiled. Without the java agent in use, this forces a .clear() on all the pageSource objects within the mapping and when Lucee goes to re-read the tmp file, it can't find it.

      Not using the java agent is a required workaround to LDEV-638 Deployed .

      Example stack trace snippet that shows the .clear() of a sourceFile
      at lucee.runtime.PageSourceImpl.clear(PageSourceImpl.java:865) <<<<<< this is the point at which the compiled tmp file source is being cleared
      at lucee.runtime.PageSourcePool.clearPages(PageSourcePool.java:183)
      at lucee.runtime.MappingImpl.clearPages(MappingImpl.java:228)
      at lucee.commons.lang.PCLCollection.loadClass(PCLCollection.java:112)
      at lucee.runtime.PageSourceImpl._compile(PageSourceImpl.java:343)
      at lucee.runtime.PageSourceImpl.compile(PageSourceImpl.java:311)
      at lucee.runtime.PageSourceImpl.loadPhysical(PageSourceImpl.java:257)
      at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:193)
      at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:936)
      at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:950)
      at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:858)
      at system.web.services.exceptionservice_cfc$cf.udfCall(/coldbox/system/web/services/ExceptionService.cfc:114)
      at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:111)
      at lucee.runtime.type.UDFImpl._call(UDFImpl.java:328)
      at lucee.runtime.type.UDFImpl.call(UDFImpl.java:229)
      at lucee.runtime.ComponentImpl._call(ComponentImpl.java:642)

      In the stacktrace above, "Inspect templates" is set to "Once", so when /coldbox/system/web/services/ExceptionService.cfc:114 does a cfinclude on a template file, Lucee recompiles it clears all the other saved PageSourceImpl objects under the same /coldbox mapping.


      Create a mapping that is only used by the AOP mixing system's temp files. This way, no other recompiles will mess with tmp file mappings.

      For coldbox / wirebox, do something like:

      // Application.cfc
      DirectoryCreate( "ram://aoptmp", false, true );
      this.mappings[ "/aoptmp" ] = "ram://aoptmp";
      // Wirebox.cfc
      wirebox.listeners = [
          { class="coldbox.system.aop.Mixer",properties={ generationPath="/aoptmp" } }




            • Assignee:
              michaeloffner Michael Offner
              dom_watson Dominic Watson
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: