{"record":{"id":"d8402f016c064489","repo":"apache/hadoop","slug":"failed-to-parse-iso-date-string-datestr","errorCode":null,"errorMessage":"Failed to parse ISO date string ${dateStr}","messagePattern":"Failed to parse ISO date string (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java","lineNumber":1063,"sourceCode":"        }\n        String expiryDateStr =\n            token.removeChildStr(SECRET_MANAGER_SECTION_EXPIRY_DATE);\n        if (expiryDateStr != null) {\n          tbld.setExpiryDate(dateStrToLong(expiryDateStr));\n        }\n        token.verifyNoRemainingKeys(\"token\");\n        tbld.build().writeDelimitedTo(out);\n      }\n      expectTagEnd(SECRET_MANAGER_SECTION_NAME);\n      recordSectionLength(SectionName.SECRET_MANAGER.name());\n    }\n\n    private long dateStrToLong(String dateStr) throws IOException {\n      try {\n        Date date = isoDateFormat.parse(dateStr);\n        return date.getTime();\n      } catch (ParseException e) {\n        throw new IOException(\"Failed to parse ISO date string \" + dateStr, e);\n      }\n    }\n  }\n\n  private class CacheManagerSectionProcessor implements SectionProcessor {\n    static final String NAME = \"CacheManagerSection\";\n\n    @Override\n    public void process() throws IOException {\n      Node node = new Node();\n      loadNodeChildren(node, \"CacheManager fields\", \"pool\", \"directive\");\n      CacheManagerSection.Builder b =  CacheManagerSection.newBuilder();\n      Long nextDirectiveId =\n          node.removeChildLong(CACHE_MANAGER_SECTION_NEXT_DIRECTIVE_ID);\n      if (nextDirectiveId == null) {\n        throw new IOException(\"CacheManager section had no <nextDirectiveId>\");\n      }\n      b.setNextDirectiveId(nextDirectiveId);","sourceCodeStart":1045,"sourceCodeEnd":1081,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/OfflineImageReconstructor.java#L1045-L1081","documentation":"Error \"Failed to parse ISO date string ${dateStr}\" thrown in apache/hadoop.","triggerScenarios":"Thrown by oiv -r when a delegation-token expiry/date string in the fsimage XML is not a valid ISO-8601 date and cannot be parsed.","commonSituations":"See trigger scenarios.","solutions":["Fix the date value so it is a valid ISO-8601 date string (e.g. 2024-01-15T10:30:00.000Z).","Regenerate the fsimage XML with 'hdfs oiv' from a valid fsimage."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}