tag:support.getcheddar.com,2009-06-01:/discussions/problems/9144-exception-parsing-dateCheddar: Discussion 2018-10-18T14:45:22Ztag:support.getcheddar.com,2009-06-01:Comment/417180032017-01-11T06:12:51Z2017-01-11T06:12:53ZException parsing date<div><p>Hi,</p>
<p>We are getting an error whenever our users try to register on
our website, <a href="http://www.magpi.com">www.magpi.com</a>. The
error being thrown is coming from CG service. See below.</p>
<p>WARN client.CGService - Exception parsing date
2017-01-10T14:54:18-05:00<br>
java.lang.StringIndexOutOfBoundsException: String index out of
range: -1<br>
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)</p>
<p>Please help us resolve this issue urgently as most of our users
cannot create an account.</p>
<p>Thanks,<br>
George</p></div>Magpi Devtag:support.getcheddar.com,2009-06-01:Comment/417180032017-01-11T07:51:28Z2017-01-11T07:51:28ZException parsing date<div><p>Hi George. It looks like you have some custom date parading
there in your<br>
Java lib. A fix was made recently in the CG API response to
consistently<br>
produce datetimes in the proper timezone which may be why the lib's
date<br>
parsing is failing. We had one other merchant with a prob with a
Java lib<br>
that was mitigated by changing the authed user's timezone to
UTC.</p></div>Marc Guyertag:support.getcheddar.com,2009-06-01:Comment/417180032017-01-11T07:52:27Z2017-01-11T07:52:27ZException parsing date<div><p>That's "parsing", not "parading"...</p></div>Marc Guyertag:support.getcheddar.com,2009-06-01:Comment/417180032017-01-11T08:18:56Z2017-01-11T08:18:56ZException parsing date<div><p>Hi Marc,</p>
<p>Thanks for the information, we will update the Java lib and see
if this will resolve the error.</p>
<p>Regards,<br>
George</p></div>Magpi Dev