Why this suddenly? Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.

Anders Yuran5 years ago

Suddenly this warning show up Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.

Everything seems to work normal though

Anders

Anton Tananaev5 years ago

It's deprecated class name. New one is com.mysql.cj.jdbc.Driver.

Anders Yuran5 years ago

Thanks! Fixed it.

Dan Dyse5 years ago

Is the documentation wrong here or does it depend on what JRE the server has?
https://www.traccar.org/mysql/

Anton Tananaev5 years ago

Documentation hasn't been updated because both options work for now. And we want instructions to work for everyone, even people with old versions of Traccar, if possible.

Dan Dyse5 years ago

Understand. My Traccar just crashed because of the "old" setting - though was working for many days. Trying the above now.

Anton Tananaev5 years ago

Let's see the crash.

Dan Dyse5 years ago

Server was running and working, suddenly it wasn't available via browser anymore. The log showing this:

2020-06-10 15:34:13  INFO: HikariPool-1 - Starting...
2020-06-10 15:34:13  WARN: Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
2020-06-10 15:34:18 ERROR: HikariPool-1 - Exception during pool initialization. - Connection refused (Connection refused) - ConnectException (... < DataManager:139 < *:89 < Context:292 < Main:110 < ...)
2020-06-10 15:34:18 ERROR: Main method error - Connection refused (Connection refused) - ConnectException (... < DataManager:139 < *:89 < Context:292 < Main:110 < ...)
Dan Dyse5 years ago

I could restart it without changing settings. Then I changed settings to the above. Restarted it again.

Anton Tananaev5 years ago

The error says connection refused. I don't think it has anything to do with the driver, but also possible that MySQL is starting to enforce usage of the new driver.