com.alibaba.fastjson.JSONException: Text '2017-01-04 13:21:39' could not be parsed at index 10


Solutions on the web

Solution icon of github
via GitHub by anjia0532
, 9 months ago
Text '2017-01-04 13:21:39' could not be parsed at index 10

Solution icon of github
For input string: "2016-07-18 14:01"

Solution icon of github
For input string: "0001-01-01T00:00:00"

Solution icon of github
length=8192; index=-1

Solution icon of github
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class

Solution icon of github
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.Class

Solution icon of web
syntax error, position at 24, name articleName

Solution icon of web
syntax error, position at 288, name articleName

Solution icon of github
syntax error, position at 55, name holiday

Solution icon of web
syntax error, position at 288, name articleName

Stack trace

com.alibaba.fastjson.JSONException: Text '2017-01-04 13:21:39' could not be parsed at index 10
	at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:643)
	at com.alibaba.fastjson.JSON.parseObject(JSON.java:339)
	at com.alibaba.fastjson.JSON.parseObject(JSON.java:243)
	at com.alibaba.fastjson.JSON.parseObject(JSON.java:456)
	at demo.main(demo.java:179)
Caused by: java.time.format.DateTimeParseException: Text '2017-01-04 13:21:39' could not be parsed at index 10
	at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
	at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
	at java.time.ZonedDateTime.parse(ZonedDateTime.java:597)
	at java.time.ZonedDateTime.parse(ZonedDateTime.java:582)
	at com.alibaba.fastjson.parser.deserializer.Jdk8DateCodec.deserialze(Jdk8DateCodec.java:95)
	at com.alibaba.fastjson.parser.deserializer.DefaultFieldDeserializer.parseField(DefaultFieldDeserializer.java:66)
	at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.parseField(JavaBeanDeserializer.java:722)
	at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:568)
	at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:187)
	at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:183)
	at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:639)
	... 4 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

3 times, 3 months ago
Once, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Once, 1 month ago
12 more bugmates