Traccar server issue : Zero date value prohibited - DataReadException

shahab2 years 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 Tananaev2 years ago

What's the API request?

shahab2 years ago
GET https://tracker-server/api/devices

response http status code is 400

Anton Tananaev2 years ago

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

shahab2 years ago

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

Anton Tananaev2 years ago

It's one of the time fields.

shahab2 years 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 Tananaev2 years ago

Try enabling full stack traces to see the full error.

shahab2 years ago

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