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

Anders Yuran4 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 Tananaev4 years ago

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

Anders Yuran4 years ago

Thanks! Fixed it.

Dan Dyse4 years ago

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

Anton Tananaev4 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 Dyse4 years ago

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

Anton Tananaev4 years ago

Let's see the crash.

Dan Dyse4 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 Dyse4 years ago

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

Anton Tananaev4 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.