-
Defect
-
Resolution: Done
-
Major
-
1.1.0
-
None
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)
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)