Uploaded image for project: 'Address Hierarchy Module'
  1. Address Hierarchy Module
  2. ADDR-116

Unable to import configuration files when application directory does not end with a slash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Code Review (Post-Commit)
    • Priority: Must
    • Resolution: Unresolved
    • Affects Version/s: 2.11.0
    • Fix Version/s: 2.12.0
    • Labels:
      None
    • Complexity:
      L

      Description

      When running OpenMRS in a Docker container (such as the one created with the OpenMRS SDK for instance), it seems that the Application directory path value is /usr/local/tomcat/.OpenMRS (see the absence of / at the end)

      The fact that it does not have a slash at the end brings a bug when loading address hierarchy files from a configuration folder.

      For example, addressConfiguration.xml file will be attempted to be fetched at /usr/local/tomcat/.OpenMRSconfiguration/addresshierarchy/addressConfiguration.xml

       

      Which will fail.

      Also it does not report an ERROR but only a WARNING which makes it difficult to spot.

      It also does not report the full path of the file attempted to be loaded.

      The error message is:

      WARN - AddressConfigurationLoader.loadAddressConfiguration(64) |2019-06-26 16:37:34,176| Address hierarchy configuration file appears invalid, skipping the loading process: addressConfiguration.xml

        Attachments

          Activity

            People

            Assignee:
            mksrom Romain Buisson
            Reporter:
            mksrom Romain Buisson
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: