tracker issue : CF-4205040

select a category, or use search below
(searches all categories and all time range)
Title:

TemplateNotFoundException using PreResources in server.xml

| View in Tracker

Status/Resolution/Reason: To Track//PRNeedInfo

Reporter/Name(from Bugbase): Jack H. / ()

Created: 08/21/2019

Components: Web Container (Tomcat)

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018,0,04,314546 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Linux

Vote Count: 0

We're receiving a TemplateNoteFound error when trying to set Tomcat <Context> in server.xml. It's able to find my folder, but gives me a coldfusion.runtime.TemplateNotFoundException: File not found whenever I try to run a CFM in that location.

 We've been using this configuration for years in production (redirecting the docBase, and using a Tomcat mapping) to manage ColdFusion servers in conjunction with Ansible. CF11 and CF2016 work just fine (with small differences to the server.xml file). As we're preparing to upgrade to CF2018, we're running into the problem of the Tomcat server returning this error whenever we try to access a file in this mapped folder.

We can't use a CF mapping because it won't allow us to visit http://server/mapped-folder/file.cfm, so it has to be a Tomcat mapping.

We tried re-enabling the Tomcat directory listing, and it can find the directory just fine. It gives me a list of the files and CFMs in the folder, no problem. If I click on any of the CFMs, I get the error. However, it can read HTML files and other static files without any problems.

Attachments:

Comments:

Hi Jack, I am unable to replicate the issue in ColdFusion 2018 update 4. I have set the virtual directory path in server.xml file and also copied WEB-INF folder to mapped folder(i.e, VD). Can you please try below example: {code:java} <Context path="/" docBase="/opt/coldfusion2018/cfusion/wwwroot" WorkDir="/opt/coldfusion2018/cfusion/runtime/conf/Catalina/localhost/tmp"> <Resources> <PreResources base="/opt/VD" className="org.apache.catalina.webresources.DirResourceSet" webAppMount="/VD"/> </Resources> </Context> {code} Which Linux platform are you using ?   Thanks, Mukesh
Comment by Mukesh K.
31337 | September 16, 2019 10:58:59 AM GMT