Uploaded image for project: 'Gateway'
  1. Gateway
  2. GTWY-1706

Whitespace only variable units cause thredds harvesting failure

XMLWordPrintable

      The Thredds harvesting process is designed to ignore "dimensionless" units, which include units with no values, whitepace only values and values of "1". Whitepace only units such as the below are not properly identified as dimensionless and cause publishing operations on such values to fail due to CacheBackedUnitFactoryImpl.create assert.

      Example variable element causing failure: <variable name="qc_v_sfc" vocabulary_name="Quality Control for v" units=" ">Quality Control for v</variable>

      Note single space units.

      Exception generated snippet:

      java.lang.IllegalArgumentException: Unit symbol must contain non-whitespace
              at org.springframework.util.Assert.hasText(Assert.java:162)
              at eske.model.metadata.inventory.factory.impl.CacheBackedUnitFactoryImpl.create(CacheBackedUnitFactoryImpl.java:54)
              at eske.model.metadata.inventory.builder.impl.UnitBuilderImpl.build(UnitBuilderImpl.java:79)
              at eske.metadata.harvest.thredds.handlers.BasicVariableHandler.findOrCreateVariable(BasicVariableHandler.java:151)
              at eske.metadata.harvest.thredds.handlers.BasicVariableHandler.processVariable(BasicVariableHandler.java:110)

              ejn Eric Nienhouse
              rgmiller Ross G. Miller (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: