lucee.runtime.exp.MissingIncludeException on startup after upgrade from 3.9 to 4.0

I just updates from 3.9 to 4.0 (4.0.0+01015) and I’m getting an odd error but only in one project. Under box 3.9, I had no problems. I get it when running box and all other commandbox related commands fail for the same reason.

`

➜ box
javax.script.ScriptException: lucee.runtime.exp.MissingIncludeException: Page /__commandbox_root/bryce/.CommandBox/cfml/system/Bootstrap.cfm [/Users/bryce/temp/raptor/users/bryce/.CommandBox/cfml/system/Bootstrap.cfm] not found
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:964)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:927)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:823)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:805)
at 61o5s7lb1i5w.call(Unknown Source)
at lucee.runtime.compiler.Renderer.tag(Renderer.java:113)
at lucee.runtime.compiler.Renderer.script(Renderer.java:101)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:64)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:199)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:283)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:150)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:506)
Caused by: lucee.runtime.exp.MissingIncludeException: Page /__commandbox_root/bryce/.CommandBox/cfml/system/Bootstrap.cfm [/Users/bryce/temp/raptor/users/bryce/.CommandBox/cfml/system/Bootstrap.cfm] not found
… 12 more
Cause:

`

This is a bit of an older project that is running CF10. My other CF11+ projects start up correctly and commandbox can startup correctly in them…

This CF10 app does have a server.json file in it. Here are the contents.

`

{
“app”:{
“serverHomeDirectory”:".engine",
“cfengine”:“adobe@10.0.23+302580”
},
“JVM”:{
“heapSize”:“1024”
},
“web”:{
“http”:{
“port”:“49796”
}
}
}

`

Looking at the error, it seems that its trying to go into a users/bryce/.CommandBox/ folder instead of going to /users/bryce/.CommandBox, but its only happening for this CF10 project. I’ve removed the project and checked out a fresh copy to ensure nothing odd was in there.

Has anybody seen this error before?

This error has nothing at all to do with servers. It’s buginess in Lucee most likely based on the current working directory you’re running Box from. Do me a favor and capture the full output of this:

box -clidebug

I wrestled with a lot of similar issues in my move to JSR-223 with Lucee, but I thought we had them all fixed at this point.

Thanks for the super quick response! I had a feeling it wasn’t related to the servers.

Heres the full output:

`

box -clidebug
initial arguments:[]
cfml.cli.name: CommandBox
home: checking for command line argument CommandBox_home
home: checking for environment variable
home: checking for system property
home: checking cli.properties
home: using default
home: /Users/bryce/.CommandBox
initial cfml.cli.home: /Users/bryce/.CommandBox
name: CommandBox
cfml.cli.pwd: /Users/bryce/temp/raptor
shell: /cfml/system/Bootstrap.cfm
cfml.cli.lib: /Users/bryce/.CommandBox/lib
cfml.cli.home: /Users/bryce/.CommandBox
cfml.server.dockicon:
usage: USAGE: box execute /path/to/script [-box_home=/path/to/dir] [-debug]
Ex: ‘box execute test.cfm’ or ‘box’ to enter shell
Or for server mode: ‘box -server --port=8088’
[-webroot=/path/to/web] [-background]
And to update your CommandBox home (default is ${user.home}.CommandBox/) after updating binary: ‘box -update’
cfml.cli.shell: /cfml/system/Bootstrap.cfm
cfml.cli.autoupdate: true
Running in CLI mode
Running in CLI mode
uri: /Users/bryce/.CommandBox/cfml/system/Bootstrap.cfm
cfml.cli.arguments: []
cfml.cli.argument.array: []
Loading Jars

  • file:/Users/bryce/.CommandBox/lib/activation-1.1.jar
  • file:/Users/bryce/.CommandBox/lib/JavaEWAH-1.1.6.jar
  • file:/Users/bryce/.CommandBox/lib/jcommander-1.47.jar
  • file:/Users/bryce/.CommandBox/lib/jline-3.7.0.jar
  • file:/Users/bryce/.CommandBox/lib/jsch-0.1.54.jar
  • file:/Users/bryce/.CommandBox/lib/json-smart-mini-1.0.8.jar
  • file:/Users/bryce/.CommandBox/lib/jzlib-1.1.1.jar
  • file:/Users/bryce/.CommandBox/lib/lucee-5.2.7.62.jar
  • file:/Users/bryce/.CommandBox/lib/luceecli.jar
  • file:/Users/bryce/.CommandBox/lib/mail-1.4.4.jar
  • file:/Users/bryce/.CommandBox/lib/org.eclipse.jgit-4.11.0.201803080745-r.jar
  • file:/Users/bryce/.CommandBox/lib/ortus-jgit.jar
  • file:/Users/bryce/.CommandBox/lib/runwar-3.8.1-SNAPSHOT.jar
    Webroot: /Users/
    Bootstrap: /bryce/.CommandBox/cfml/system/Bootstrap.cfm

mappings = getApplicationSettings().mappings;
mappings[ ‘/__commandbox_root/’ ] = ‘/Users/’;
application mappings=’#mappings#’ action=‘update’;
include ‘/__commandbox_root/bryce/.CommandBox/cfml/system/Bootstrap.cfm’;

javax.script.ScriptException: lucee.runtime.exp.MissingIncludeException: Page /__commandbox_root/bryce/.CommandBox/cfml/system/Bootstrap.cfm [/Users/bryce/temp/raptor/users/bryce/.CommandBox/cfml/system/Bootstrap.cfm] not found
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:964)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:927)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:823)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:805)
at 61o5s7lb1i5w.call(Unknown Source)
at lucee.runtime.compiler.Renderer.tag(Renderer.java:113)
at lucee.runtime.compiler.Renderer.script(Renderer.java:101)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:64)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:199)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:283)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:150)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:506)
Caused by: lucee.runtime.exp.MissingIncludeException: Page /__commandbox_root/bryce/.CommandBox/cfml/system/Bootstrap.cfm [/Users/bryce/temp/raptor/users/bryce/.CommandBox/cfml/system/Bootstrap.cfm] not found
… 12 more
Cause:
lucee.runtime.exp.MissingIncludeException: Page /__commandbox_root/bryce/.CommandBox/cfml/system/Bootstrap.cfm [/Users/bryce/temp/raptor/users/bryce/.CommandBox/cfml/system/Bootstrap.cfm] not found
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:964)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:927)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:823)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:805)
at 61o5s7lb1i5w.call(Unknown Source)
at lucee.runtime.compiler.Renderer.tag(Renderer.java:113)
at lucee.runtime.compiler.Renderer.script(Renderer.java:101)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:64)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:199)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:283)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:150)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:506)
cfml.cli.exitCode: 0

`

Everything there looks good. Since it’s only happening in one folder I think it’s related to the folders present in the working directory. What folders are present in /Users/bryce/temp/raptor ?

Here all the files, including hidden ones.

`

.engine/
.git/
.sass-cache/
.vscode/
_frameworks/
access/
action_panel/
alerts/
api/
audit/
billing/
billto/
boards/
carriers/
cfc/
cfc_tests/
client_integration/
client_portal/
company/
config/
credit/
crm/
css/
customers/
dat360/
document_generation/
documents/
edi/
emails/
event_cal/
finance/
image_archive/
images/
import/
includes/
jquery/
js/
js_tests/
ltl_module/
ltlms/
menus/
module/
node_modules/
pcmiler/
pricing/
probe/
rail_schedules/
ramps/
rates/
reports/
roles/
scheduled_tasks/
shipments/
sites/
test/
third_party/
tools/
transcore/
users/
util/
utility/
valums/

`

If this is something better suited in Slack, let me know. I can hop into the cfml slack channel and post the resolution here once complete.

I think your problem is the raptor/users folder. Please rename it as a test and try again.

Ha! Thats it. Renaming solves it. :slight_smile:

Is the anyway for me to avoid a refactor of that users folder and everything that references it?

In my opinion, this is a Lucee bug but I’m fairly sure I had this conversation with Micha a few months ago and he told me it was “working as designed”. I had so many issues with mappings I lost track of all the conversations though. The easy fix for now is for you to just start box from another folder. You can always “cd” into the folder you want to work in afterwards.

I’ll have to try and figure out if one the existing tickets I put in for mapping issues applies here. Some of the Lucee tickets I entered were fixes, others I just had to work around. Even though it’s not exactly the same, it may be related to this ticket:
https://luceeserver.atlassian.net/browse/LDEV-1728?filter=-2

which spun off this fix that I never really understood what it was supposed to do:
https://luceeserver.atlassian.net/browse/LDEV-1731

Actually, I’m curious if you can try something. A some point Micha added a system property called lucee.mapping.first that is supposed to affect how Lucee resolves mappings though I quit using it as it never seemed to make any difference. Can you create a file called commandbox.properties in the same folder as the box binary and place this line in the file:

lucee.mapping.first=true

I just curious if it has any affect on how the bootstrap path is resolved.

Ah. That makes sense! Glad you see it as a bug too. I can see others running into the same thing.

I just renamed the file back to users and followed your workaround suggestion. Worked like a charm.

I installed commandbox via homebrew. I’ve added commandbox.properties with that line you provided to /usr/local/Cellar/commandbox/4.0.0/bin, but no luck. Still getting the same error.

Ok, thanks for testing that. I’m not entirely sure what that flag is even supposed to do but it’s something Micha created when I was going back and forth with him on mapping issues so I thought it would be worth a shot,. I’ll likely have to enter another Lucee ticket to try and track down what “working as designed” behavior we’ve hit now.

If you do, can you share the link to the issue here? I’d love to follow it.

Ok, I don’t know when I’ll have a chance to tackle this. I’ll need to create a self-contained example for the ticket but this is difficult for me since I use WIndows and a lot of these weird mapping things only happen on *nix. Feel free to try and reproduce in a normal server environment. Basically, when Lucee is loaded via JSR-223, it treats the current working directory that you started the binary in as the “webroot”, or the default “/” mapping if you will. Windows is less ambiguous since our drive roots look like C:\ but for you poor *nix folk there’s instant ambiguity of where / points to. The webroot, or the drive root! You’ll need to create a CF mapping that pointed to a folder in the root of your drive and ALSO have that same folder in your web root.

The allowRelPath thing Micha did in LDEV-1731 may or may not affect this, Again, I don’t really know what it’s supposed to do. Micha just sort of went off and created that ticket and implemented it without any documentation or explanation while we were discussing LDEV-1728.

This poor *nix guy will put together an example for it here in the next few days. :slightly_smiling_face:

Thanks again for all your help, Brad!

That wouid be great. Thanks!

Another tidbit of info. Looks like this instance of the problem is only related to case insensitive *nix systems (osx in my case). Had a coworker try it out on Linux and they didn’t have the problem at all since /users isn’t the same as /Users.