Initial install broken if default data/backup directory unavailable
Initialization of a fresh install requires establishing data and backup directories for metacat. The system searches for a number of default directory options (SystemUtil.discoverExternalDir()). If no default can be found or created, the system generates and stores an invalid value ('null/.knb') that prevents further initialization and can be fixed only by manual editing or reinstallation.
This is caused by a number of separate, interacting bugs. ConfigurableProperties.initialize() converts and propagates the null value due to an improper test. Arguably SystemUtil.discoverExternalDir() should not generate null at all. PropertyService does not udpate its ConfigurableProperties object as it should. ConfigurableProperties should not maintain two separate instances of the same datum (the backup file path; it may do this for other properties as well).
#1 Updated by Brendan Hahn over 8 years ago
Currently fixed by correcting the initial-value test in ConfigurableProperties.initialize and re-initializing at the proper time. This latter change means a small amount of redundant/wasted initialization work, but the operations are idempotent. It is not clear why re-initialization was disabled.
A more thorough fix would undertake some restructuring of ConfigurableProperties and related clients/dependencies.