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:
-
In
ant/upload_to_s3.cfm(createLight(), lines 230–234),lucee-lightis 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/.indexalong with the.lexfiles, leavingextensions/completely empty. -
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/.indexwas deleted in step 1,isisnulland it logsERROR.
Suggested Fix
Either:
- In
ant/upload_to_s3.cfm, touch an empty.indexfile when recreating the directory:fileWrite( extDir & sep & ".index", "" ); - Or in
CFMLEngineImpl.java:765, treatis == nullas benign (e.g. log atDEBUGor return0quietly) when running a light distribution without bundled extensions.