[Lucee Light] Spurious `ERROR [server.deploy] Could not find [/extensions/.index]` on clean boot

Lucee Version: 7.1.2.173-SNAPSHOT (Light build)
Artifact: lucee-light-*.jar
Location: ant/upload_to_s3.cfm & core/.../CFMLEngineImpl.java


Hi team,

When bootstrapping a clean container or server using lucee-light-*.jar, Lucee logs the following error during initialization:

ERROR [server.deploy] Could not find [/extensions/.index] defined in the index of the lucee.jar

The boot process then recovers and proceeds normally, but after reviewing the Lucee source repository, the exact cause of this false-alarm error is clear:

  1. In ant/upload_to_s3.cfm (createLight(), lines 230–234), lucee-light is generated by unzipping the full loader and removing the bundled extensions:

    // remove extensions
    var extDir = tmpLoader&sep&"extensions";
    if ( directoryExists( extDir ) )
        directoryDelete( extDir, true ); // deletes directory with all files inside
    directoryCreate( extDir ); // create empty dir again ( maybe Lucee expect this directory to exist )
    

    This deletes extensions/.index along with the .lex files, leaving extensions/ completely empty.

  2. On startup, CFMLEngineImpl.java (deployBundledExtension(), lines 759–767) checks for that index file via the classloader:

    ClassLoader cl = CFMLEngineFactory.getInstance().getCFMLEngineFactory().getClass().getClassLoader();
    InputStream is = cl.getResourceAsStream("extensions/.index");
    if (is == null) is = cl.getResourceAsStream("/extensions/.index");
    if (is == null) is = SystemUtil.getResourceAsStream(null, "/extensions/.index");
    
    if (is == null) {
        log.error("extract-extension", "Could not find [/extensions/.index] defined in the index of the lucee.jar");
        return count;
    }
    

    Because extensions/.index was deleted in step 1, is is null and it logs ERROR.

Suggested Fix

Either:

  • In ant/upload_to_s3.cfm, touch an empty .index file when recreating the directory:
    fileWrite( extDir & sep & ".index", "" );
    
  • Or in CFMLEngineImpl.java:765, treat is == null as benign (e.g. log at DEBUG or return 0 quietly) when running a light distribution without bundled extensions.

Thanks @philsw, spot on, that’s exactly what happens. I’ve filed it as LDEV-6665: the Light build now keeps an empty extensions/.index, and core logs a missing index at debug level instead of ERROR, since having no bundled extensions is normal. The fix is merged into 7.1; this only affects 7.x, as 8.0 drops the Light build. I’ll report back here once there’s a snapshot to test.