Hi all,
I am trying to use traccar on a mysql database that has a different schema , and I am using the same position table schema but with another table name 'locations', now I can receive information from test devices, and can insert into locations table, but when I disable the traccar web
<entry key='web.enable'>false</entry>
, then server will not insert any thing to the database.
Here is the configuration:
<!-- SERVER CONFIG -->
<entry key='web.enable'>true</entry>
<entry key='web.port'>8082</entry>
<entry key='web.path'>C:\Program Files\Traccar\web</entry>
<entry key='geocoder.enable'>false</entry>
<entry key='geocoder.type'>google</entry>
<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
<entry key='logger.file'>C:\Program Files\Traccar\logs\tracker-server.log</entry>
<!-- DATABASE CONFIG For Mysql-->
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://127.0.0.1:3306/gpsserver?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=ANSI_QUOTES</entry>
<entry key='database.user'>root</entry>
<entry key='database.password'></entry>
<entry key='database.selectDevicesAll'>
SELECT id , imei AS uniqueId FROM objects WHERE imei REGEXP '^[0-9]+$' ;
</entry>
<entry key='database.insertPosition'>
INSERT INTO locations (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes)
VALUES (:deviceId, :protocol, :now, :deviceTime, :fixTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes);
</entry>
This is the server log
2016-06-23 23:43:49 INFO: [031044DC] connected
2016-06-23 23:43:49 DEBUG: [031044DC: 5055 < 192.168.1.10] HEX: 474554202f3f69643d3732353039332674696d657374616d703d31343636373134323932266c61743d32342e373130323739266c6f6e3d34362e3832363939312673706565643d302662656172696e673d3026616c7469747564653d3630362e38323226626174743d3020485454502f312e310d0a486f73743a203139322e3136382e312e33343a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a557365722d4167656e743a2054726163636172436c69656e742f332e302043464e6574776f726b2f3637322e312e31352044617277696e2f31342e302e300d0a4163636570742d4c616e67756167653a20656e2d75730d0a4163636570743a202a2f2a0d0a0d0a
2016-06-23 23:43:49 DEBUG: [031044DC: 5055 > 192.168.1.10] HEX: 485454502f312e3120323030204f4b0d0a0d0a
2016-06-23 23:43:49 INFO: [031044DC] disconnected
2016-06-23 23:43:49 INFO: Query not provided: database.updateDeviceStatus
2016-06-23 23:43:49 WARN: [031044DC] error - NullPointerException (ConnectionManager:115 < BaseProtocolDecoder:104 < ExtendedObjectDecoder:60 < ...)
Hi all,
I am trying to use traccar on a mysql database that has a different schema , and I am using the same position table schema but with another table name 'locations', now I can receive information from test devices, and can insert into locations table, but when I disable the traccar web
<entry key='web.enable'>false</entry>
, then server will not insert any thing to the database.
Here is the configuration:
This is the server log