-1

I am using jersey restful webservice and grails.

My response is not map with object in grails.

I am getting below problem.

org.codehaus.groovy.runtime.typehandling.GroovyCastException: 

Cannot cast object '{effectiveEndDate=4712-12-31T00:00:00+05:30, 
effectiveStartDate=2015-10-15T00:00:00+05:30, id=5763, visaCost=0, 
visitVisas=0}' with class 'groovy.json.internal.LazyMap' to class 
'com.evosys.modal.pmo.Project' 

due to: org.codehaus.groovy.runtime.typehandling.GroovyCastException: 
Cannot cast object '4712-12-31T00:00:00+05:30' with class 
'java.lang.String' to class 'java.util.Date'

Thanks

Hardik Patel
  • 937
  • 3
  • 14
  • 39

1 Answers1

1

It looks like that the value of effectiveEndDate in json object with type String but the type of effectiveEndDate in Project is Date. Change the pattern of date's value in json object,please.

see this Having trouble converting string (parsed from JSON) into javascript date object

Community
  • 1
  • 1
owen.choi
  • 11
  • 2