title: Unable to obtain LocalDateTime from TemporalAccessor when parsing LocalDateTime (Java 8)
body: <p>I am simply trying to convert a date string into a DateTime object in Java 8. Upon running the following lines:</p>
  
  <pre><code>DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
  LocalDateTime dt = LocalDateTime.parse("20140218", formatter);
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Exception in thread "main" java.time.format.DateTimeParseException: 
  Text '20140218' could not be parsed: 
  Unable to obtain LocalDateTime from TemporalAccessor: 
  {},ISO resolved to 2014-02-18 of type java.time.format.Parsed
      at java.time.format.DateTimeFormatter.createError(DateTimeFormatter.java:1918)
      at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1853)
      at java.time.LocalDateTime.parse(LocalDateTime.java:492)
  </code></pre>
  
  <p>The syntax is identical to what has been suggested <a href="https://stackoverflow.com/questions/22463062/how-to-parse-format-dates-with-localdatetime-java-8">here</a>, yet I am served with an exception. I am using <code>JDK-8u25</code>.</p>