Traccar server issue : Zero date value prohibited - DataReadException

shahab7 months ago

Hi,
recently i getting this error on get device api

Zero date value prohibited - DataReadException (... < QueryBuilder:368 < *:446 < DatabaseStorage:76 < DeviceResource:116 < ...)

my traccar version is 5.6, i have checked the logs and there everything is seems normal

Anton Tananaev7 months ago

What's the API request?

shahab7 months ago
GET https://tracker-server/api/devices

response http status code is 400

Anton Tananaev7 months ago

Looks like you have some invalid data in the database. Or at least your database is considering it as invalid.

shahab7 months ago

but it was working fine 2 days back, can help me how can i find that invalid value?

Anton Tananaev7 months ago

It's one of the time fields.

shahab7 months ago

so in device table there are 4 coloumn which has timestamo datatype and i have checked there is either timestamp or null value present
lastupdate = mostly timestamp and some null value
expirationtime = all null values
motiontime = all null values
overspeedingtime = all null values

i am not been able to find any issue with the data

Anton Tananaev7 months ago

Try enabling full stack traces to see the full error.

shahab7 months ago

I got it, actually in motiontime there was a data entry 0000-00-00 00:00:00
now it is fixed