Document storage does not validate value until a user attempts to upload

Description

Description of problem:
Zanata should either fail to start, or display a very large error on startup, if the document-storage-directory is not set. It would be even better if it could tell if:

  • the directory is not set correctly (non-existent, cannot write to)

  • the directory is in tmp (volatile storage)

Version-Release number of selected component (if applicable):
3.5.0-SNAPSHOT (git-server-3.4.2-297-g18385b6)

How reproducible:
Easy always

Steps to Reproduce:
1. Edit $JBOSS_HOME/standalone/configuration/standalone.xml
2. Comment out the line
<simple name="java:global/zanata/files/document-storage-directory" value="/var/lib/zanata/documents"/>
3. Start the server
4. Log in, create/go to a project version, click Settings, Documents, upload
5. Upload a document

Actual results:
java.lang.RuntimeException: Document storage location is not configured in JNDI.

Expected results:
The error should have been displayed, prominently, at startup.

Additional info:

Environment

None

Assignee

David Mason

Reporter

Damian Jansen

Labels

Tested Version/s

None

Components

Priority

unspecified
Configure