Question

Different output in live and local environment. Receiving error

The code seems to behave differently in local environment and differently in a live one. A code that works locally doesnt seem to work on digital ocean server.

This is the code I am using and it works fine in local environment

def date = params.deadline def dateAgain = date.tokenize(‘/’) def BD = dateAgain[2] + “-” + dateAgain[0] + “-” + dateAgain[1] + " “+ params.deadLinSubmiteTime +”:00" def deadline = Date.parse(“yyyy-MM-dd HH:mm:ss”, BD)

—————————————————————————————————

And this error is what I get in live environment

Unparseable date: “null-10-01-2018-null 16:51:00”. Stacktrace follows: java.text.ParseException: Unparseable date: “null-10-01-2018-null 16:51:00” at java.text.DateFormat.parse(DateFormat.java:357) at crm.ContactsController.addTask(ContactsController.groovy:1017) 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)

Using MySQL, Tomcat 7 in Ubuntu 14.04.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!