ERROR - java.time.format.DateTimeParseException: Text '' could not be parsed at index

Error

java.time.format.DateTimeParseException: Text '' could not be parsed at index
    

at 

java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1947)
    at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1849)
    at java.time.LocalTime.parse(LocalTime.java:441)


Error Type

Run Time

Sample Code

LocalTime time = LocalTime.parse("11:13:", DateTimeFormatter.ISO_DATE);

LocalDate date = LocalDate.parse("2015", DateTimeFormatter.BASIC_ISO_DATE);

Cause

Parse Exception as the Date Time Specified doesn't have a correct format.

Resolution

Correct the text to be parsed and make sure that its format is complete and correct.

LocalTime time = LocalTime.parse("11:13:10", DateTimeFormatter.ISO_DATE);

LocalDate date = LocalDate.parse("20150131", DateTimeFormatter.BASIC_ISO_DATE);