database changes in 3.14 for customized database connection

john taa7 years ago

Hello, I am using traccar with mysql with a customized database schema and it is running great, Now I am trying to upgrade to 3.14, but I got many errors, I found many queries were removed in the new 3.14 default.xml.
I tried to disable many options like events , alarms .... but still have warnings about "No value specified for parameter 3 - SQLException", and info saying "Query not provided: database.updateDeviceExtended". and data not inserted into database.
So, where are the old queries that I need to customize to suit my application, like insertPositions. I cannot find anything on documentation about the new changes. or how to migrate . also the query updateDeviceExtended, is not exist in the code.
Can you please guide me to find the solution .
Here is the log output thank you.

2017-12-08 18:02:24  INFO: Query not provided: database.selectUserUsers
2017-12-08 18:02:24  INFO: Query not provided: database.selectUserGroups
2017-12-08 18:02:24  INFO: Query not provided: database.selectUserDevices
2017-12-08 18:02:24  INFO: Query not provided: database.selectAttributes
2017-12-08 18:02:24  INFO: Query not provided: database.selectUserAttributes
2017-12-08 18:02:24  INFO: Query not provided: database.selectGroupAttributes
2017-12-08 18:02:24  INFO: Query not provided: database.selectDeviceAttributes
2017-12-08 18:02:24  INFO: Query not provided: database.selectDrivers
2017-12-08 18:02:24  INFO: Query not provided: database.selectUserDrivers
2017-12-08 18:02:24  INFO: Query not provided: database.selectGroupDrivers
2017-12-08 18:02:24  INFO: Query not provided: database.selectDeviceDrivers

2017-12-08 18:02:57  INFO: [F8C99E71] connected
2017-12-08 18:02:57 DEBUG: [F8C99E71: 5055 < 192.168.1.37] HEX: 504f5354202f3f69643d3235323532352674696d657374616d703d31353132373239343539266c61743d32342e373130323738266c6f6e3d34362e3832363937392673706565643d302e333833323034363934323536373832362662656172696e673d3026616c7469747564653d3539382e3234333235343636313536303126626174743d353120485454502f312e310d0a486f73743a203139322e3136382e312e34303a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f34382043464e6574776f726b2f3838372044617277696e2f31372e302e300d0a4163636570742d4c616e67756167653a2061720d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2017-12-08 18:02:57 DEBUG: [F8C99E71: 5055 > 192.168.1.37] HEX: 485454502f312e3120323030204f4b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2017-12-08 18:02:57  INFO: Query not provided: database.updateDeviceExtended
2017-12-08 18:02:57  WARN: No value specified for parameter 3 - SQLException (... < QueryBuilder:477 < DataManager:327 < DefaultDataHandler:27 < ...)
2017-12-08 18:02:57  INFO: [F8C99E71] id: 252525, time: 2017-12-08 13:37:39, lat: 24.71028, lon: 46.82698, speed: 0.4, course: 0.0
2017-12-08 18:02:57 DEBUG: [F8C99E71: 5055 < 192.168.1.37] HEX: 504f5354202f3f69643d3235323532352674696d657374616d703d31353132373239343637266c61743d32342e373130323738266c6f6e3d34362e3832363937392673706565643d302e333833323034363934323536373832362662656172696e673d3026616c7469747564653d3539382e3234333235343636313536303126626174743d313820485454502f312e310d0a486f73743a203139322e3136382e312e34303a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f34382043464e6574776f726b2f3838372044617277696e2f31372e302e300d0a4163636570742d4c616e67756167653a2061720d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2017-12-08 18:02:57 DEBUG: [F8C99E71: 5055 > 192.168.1.37] HEX: 485454502f312e3120323030204f4b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2017-12-08 18:02:57  INFO: Query not provided: database.updateDeviceExtended
2017-12-08 18:02:57  WARN: No value specified for parameter 3 - SQLException (... < QueryBuilder:477 < DataManager:327 < DefaultDataHandler:27 < ...)
2017-12-08 18:02:57  INFO: [F8C99E71] id: 252525, time: 2017-12-08 13:37:47, lat: 24.71028, lon: 46.82698, speed: 0.4, course: 0.0
2017-12-08 18:02:57 DEBUG: [F8C99E71: 5055 < 192.168.1.37] HEX: 504f5354202f3f69643d3235323532352674696d657374616d703d31353132373435333733266c61743d32342e373130323738266c6f6e3d34362e3832363937392673706565643d302662656172696e673d3026616c7469747564653d3539382e3234333232353039373635363226626174743d313820485454502f312e310d0a486f73743a203139322e3136382e312e34303a353035350d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a4163636570743a202a2f2a0d0a557365722d4167656e743a2054726163636172436c69656e742f34382043464e6574776f726b2f3838372044617277696e2f31372e302e300d0a4163636570742d4c616e67756167653a2061720d0a436f6e74656e742d4c656e6774683a20300d0a4163636570742d456e636f64696e673a20677a69702c206465666c6174650d0a0d0a
2017-12-08 18:02:57 DEBUG: [F8C99E71: 5055 > 192.168.1.37] HEX: 485454502f312e3120323030204f4b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2017-12-08 18:02:57  INFO: Query not provided: database.updateDeviceExtended
Anton Tananaev7 years ago

I think the error is pretty clear. You are trying to use parameter that doesn't exist.

john taa7 years ago

Nothing changed from the old version in the default.xml , for that reason I don't know what is the wrong parameter

Anton Tananaev7 years ago

It clearly says that parameter 3 is wrong.

john taa7 years ago

Ok, where can I find the new data.insertPosition query ?

Anton Tananaev7 years ago

It's generated automatically now, so you need to look in the code.

john taa7 years ago

Hi, Anton , I found the error , it is in the insertPositions query were server not converting ":now" to the local server time but said ** NOT SPECIFIED ** , is there any changes regarding this :now ?

Anton Tananaev7 years ago

It has been removed. Use standard database function to get current time.

john taa7 years ago

Thank you .