Exception parsing date

Dev Dev's Avatar

Dev Dev

11 Jan, 2017 06:12 AM


We are getting an error whenever our users try to register on our website, www.magpi.com. The error being thrown is coming from CG service. See below.

WARN client.CGService - Exception parsing date 2017-01-10T14:54:18-05:00
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1904) at com.cheddargetter.client.CGService.fixDateFormat(CGService.java:577) at com.cheddargetter.client.CGService.parseCgDate(CGService.java:565) at com.cheddargetter.client.CGInvoice.(CGInvoice.java:88) at com.cheddargetter.client.CGSubscription.(CGSubscription.java:141) at com.cheddargetter.client.CGCustomer.(CGCustomer.java:107) at com.cheddargetter.client.CGService.createNewCustomer(CGService.java:206) at org.datadyne.billing.CheddarService.createFreeCustomer(CheddarService.groovy:203) at org.datadyne.episurveyor.auth.RegisterService.newRegistration(RegisterService.groovy:97) at org.datadyne.episurveyor.auth.RegisterController$_closure2.doCall(RegisterController.groovy:68) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

Please help us resolve this issue urgently as most of our users cannot create an account.


  1. Support Staff 1 Posted by Marc Guyer (old... on 11 Jan, 2017 07:51 AM

    Marc Guyer (old owner)'s Avatar

    Hi George. It looks like you have some custom date parading there in your
    Java lib. A fix was made recently in the CG API response to consistently
    produce datetimes in the proper timezone which may be why the lib's date
    parsing is failing. We had one other merchant with a prob with a Java lib
    that was mitigated by changing the authed user's timezone to UTC.

  2. Support Staff 2 Posted by Marc Guyer (old... on 11 Jan, 2017 07:52 AM

    Marc Guyer (old owner)'s Avatar

    That's "parsing", not "parading"...

  3. 3 Posted by Dev Dev on 11 Jan, 2017 08:18 AM

    Dev Dev's Avatar

    Hi Marc,

    Thanks for the information, we will update the Java lib and see if this will resolve the error.


  4. Meghan Turner closed this discussion on 10 Feb, 2017 04:38 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac