Perforce Public Knowledge Base - Commons FileNotFoundException: tmpl/*.html
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Commons FileNotFoundException: tmpl/*.html

« Go Back



On navigating to the Commons page your browser displays an error like this:


Problem accessing /login. Reason:


Caused by: tmpl/login.html
at org.springframework.web.servlet.view.mustache.MustacheTemplateLoader.getTemplate( 
at org.springframework.web.servlet.view.mustache.MustacheViewResolver.buildView(
at org.springframework.web.servlet.view.UrlBasedViewResolver.loadView( 

Usually your Commons server was working fine before this error occurs.

Other "tmpl" files may be within the FileNotFoundException , such as about.html, commons.html, or commons_ui.html.

A 500 error with a ClassNotFoundException may also be caused by the same root cause.  To confirm the same root cause, unpack the contents of commons.war and verify the exception's missing class exists in the war.  If the class exists in the war file, the root cause is the same.


To resolve, the Commons web server must be restarted.  As the cause likely affects the other Commons web apps,  restart them all.


Someone or something deleted the Commons application's unpacked war files.

Each Commons' application context xml file contains the element to unpack the war file.  For Jetty, the location of the unpacked files is usually either $(jetty.home)/work or $(  Reference:  Jetty's Temporary Directories documentation.

Your jetty instance's startup command may not define jetty.home nor or the work subdirectory does not exist.  If so, the usual location for the tmpdir is /tmp.  Many sysadmins regularly purge old files from /tmp;  this can then delete the unpacked files.

This in unlikely to happen with other web servers, such as Tomcat, since they do not by detault unpack to /tmp.

Once the unpacked file(s) are deleted you will encounter the error(s) above.

Long Term Solution

The long term solution is to either:

  • never delete the jetty unpacked war files under /tmp
  • define an alternate location for the unpacked war

To define an alternate location: 

  • If your startup script does not define the jetty.home property, add -Djetty.home=/path/to/jetty_home.  Do this for each of the four Commons jetty instances' startup commands. 
  • Create the work subdirectory (/path/to/jetty_home/work) with permissions allowing the jetty process owner full access to the directory.   On restart, jetty will unpack to this new location.

OVA notes

A VM based on commons.ova assumes you will not be deleting the files in /tmp so no action should be necessary.  If you do need to move the files out of /tmp, create the directory /opt/jetty/work with permissions allowing user 'jetty' full access; the init.d startup scripts already define jetty.home for you.

Sample unpacked war file directories on a commons.ova based VM:

root@dhcp-35-n101:/opt/jetty# ls -l /tmp/jetty*
total 4488
drwxr-xr-x 4 jetty jetty    4096 Oct  7 19:25 jetty-
drwxr-xr-x 4 jetty jetty    4096 Sep 17 16:14 jetty-
drwxr-xr-x 4 jetty jetty    4096 Sep 17 16:14 jetty-
drwxr-xr-x 4 jetty jetty    4096 Sep 17 16:14 jetty-
Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255