ParseException - Invalid year value

67 views
Skip to first unread message

Carlos Verdier

unread,
Nov 3, 2017, 6:46:15 AM11/3/17
to CodenameOne Discussions
Hi

Since yesterday's update, I'm getting the following exception, which does not affect the app, but it's a bit annoying.

[Network Thread] 0:1:4,24 - Exception: com.codename1.l10n.ParseException - Invalid year value
com.codename1.l10n.ParseException: Invalid year value
at com.codename1.l10n.SimpleDateFormat.throwInvalid(SimpleDateFormat.java:583)
at com.codename1.l10n.SimpleDateFormat.validateNumber(SimpleDateFormat.java:571)
at com.codename1.l10n.SimpleDateFormat.parseYear(SimpleDateFormat.java:729)
at com.codename1.l10n.SimpleDateFormat.parse(SimpleDateFormat.java:482)
at com.codename1.io.ConnectionRequest.parseCookieHeader(ConnectionRequest.java:1029)
at com.codename1.io.ConnectionRequest.performOperation(ConnectionRequest.java:707)
at com.codename1.io.NetworkManager$NetworkThread.run(NetworkManager.java:282)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)

This is new. I wasn't getting this yesterday. There are several places in my code where I parse dates, but as I said, they are working just fine. The only problem is the stack trace in the output.


Steve Hannah

unread,
Nov 3, 2017, 8:10:48 AM11/3/17
to codenameone...@googlegroups.com
We have added some additional logging around this stack trace to include the date that failed to parse.  It will be available Monday I think.  Please repost at that time with the modified stack trace so I can see the date that failed.

This occurs while parsing a cookie's expiry date.  The exception is caught and logged so it shouldn't affect your app - except for the fact that it failed to parse the cookie expiry.

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/bc0c0bb5-687c-4039-a99f-eeb17be3bbfe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

Carlos Verdier

unread,
Nov 3, 2017, 3:21:51 PM11/3/17
to CodenameOne Discussions
Ok, Steve, I'll keep you posted. Thank you.

Carlos Verdier

unread,
Nov 14, 2017, 5:44:45 AM11/14/17
to CodenameOne Discussions
 I haven't updated this thread because I'm still getting the same stack trace, no verbose version still...

Shai Almog

unread,
Nov 15, 2017, 12:14:03 AM11/15/17
to CodenameOne Discussions
This should have been deployed a while back. I think there should be a printout above with the value of the cookie header.
Reply all
Reply to author
Forward
0 new messages