Support Article
MapperParsingException while indexing work objects of a class
Summary
When searching for any work object, records are not available for the work object. However, the work object is available in the System.
Error Messages
Type: java.lang.IllegalArgumentException
Message: Invalid format: "50L0-11-00" is malformed at "L0-11-00"
Stack
at org.joda.time.format.DateTimeParserBucket.doParseMillis(DateTimeParserBucket.java:187)
at org.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:826)
at org.elasticsearch.index.mapper.core.DateFieldMapper$DateFieldType.parseStringValue(DateFieldMapper.java:366)
at org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:534)
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:241)
at org.elasticsearch.index.mapper.FieldMapper.parse(FieldMapper.java:321)
at (:)
Type: MapperParsingException[failed to parse [SelectedSalesAreas]]; nested
Message: IllegalArgumentException[Invalid format: "50L0-11-00" is malformed at "L0-11-00"];
Steps to Reproduce
- Log in to application.
- Search for any work object from the Case Worker portal.
Root Cause
The ElasticSearch Dynamic Template Configuration was set such that all the Dates are entered as strings. All the fields must be mapped to type String, despite their structure. For example:
- When the Date field has the structure 10-10-2017, where the last 4 digits is the year, the Date is type cast as a String.
- When a field has the structure 2H17-10-10, where the four digits (year) at the beginning includes an alpha character, the ElasticSearch property casts this as a String.
- When a field has the structure 2017-10-10, where the four digits at the beginning do not include an alpha character, the ElasticSearch ignores the Dynamic Template setting. It sets the field as a Date.
Resolution
Apply HFix-39473.
Published February 20, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.