modulesExternalLocation issue

I was trying to build RestAPI with Coldbox. Installed below sample app using commanbox and it was working.

install bdw429s/coldbox-versioned-api
server start

I moved the modules code to a external folder "ExtModules" which is at the same level of "coldbox-versioned-api" folder.
In coldbox.cfc added 

modulesExternalLocation         = ["C:/Projects/RnD/ExtModules"]

Now when I run the code, I'm getting below error (Attached screenshot for reference)

Similar code works in Lucee sever webroot (without commandbox)

Please give me your suggestions on this issue.


You need to create CF mapping that points to your external folder (or some folder higher) and use that in your ColdBox setting. In other words, provide a CFC mapping path, not an expanded path. The reason is that CF is not capable of creating arbitrary CFCs outside of the web root unless there is a CF mapping. You can see from the error message that Coldbox simply tried to replace all slashes with periods. but that won’t work on an expanded path.

So in your Application.cfc:

this.mappings[ ‘ExtModules’ ] = expandPath( '…/…/ ExtModules ’ ); // Adjust as necessary…

And in /config/Coldbox.cfc
modulesExternalLocation = ["/ExtModules"]

Thanks Brad. I created cfmapping using commandbox and its working awsome.