bug ? event report empty / WARN: Report failed - Column "SERVERTIME" not found;

Tranbert3 years ago

On my traccar/docker/synology v4.13, log ,conf+data folders on permanent volume, updated yesterday :

In standard UI, when generating an event report,

event report settings

Got empty result with this error in logs :

2021-06-06 07:07:23  WARN: Report failed - Column "SERVERTIME" not found; SQL statement:
SELECT * FROM tc_events WHERE deviceId = ? AND serverTime BETWEEN ? AND ? ORDER BY serverTime [42122-200] - JdbcSQLSyntaxErrorException (... < QueryBuilder:64 < *:130 < DataManager:349 < Events:77 < ...)

then UI bug if I try to generate another event report :

UI bug

Bug or update problem ?

Btw : No datas to keep in database, ongoing test server, only a lot of geofencing zones hand tailored with love :-(

Tranbert3 years ago

Okkkkk so : replacing serverTime by eventTime in traccar.xml works. But I think it's not a clean patch... I'll migrate to plain Linux install+MySQL asap.

<entry key='database.selectEvents'>
        SELECT * FROM tc_events WHERE deviceId = :deviceId AND eventTime BETWEEN :from AND :to ORDER BY eventTime
    </entry>
```	    
Hai Nguyen3 years ago

Because your tc_events don't have field eventTime,
Fix: manually change serverTime to eventTime in your tc_events.

Tranbert3 years ago

Ok... thanks.