BenCodez / VotingPlugin

Plugin on SpigotMC
Other
83 stars 68 forks source link

Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation. #1157

Closed mibby closed 3 years ago

mibby commented 3 years ago

Versions VotingPlugin dev 739

Describe the bug

[23:24:31] [Server thread/INFO]: [VotingPlugin] Enabling VotingPlugin v6.3
[23:24:31] [Server thread/WARN]: 4 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Starting...
[23:24:31] [Server thread/WARN]: 16 [Server thread] WARN com.bencodez.votingplugin.advancedcore.hikari.util.DriverDataSource - Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.
[23:24:31] [Server thread/WARN]: 29 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Start completed.
[23:24:32] [Server thread/INFO]: [VotingPlugin] Enabled VotingPlugin 6.3
[23:24:32] [Server thread/WARN]: [VotingPlugin] Using dev build, this is not a stable build, use at your own risk

Is there any way to fix driver initialization or figure out why it's relying on direct instantiation?

BenCodez commented 3 years ago

What server jar do you have?

On Wed, May 19, 2021, 2:46 AM mibby @.***> wrote:

Versions VotingPlugin dev 739

Describe the bug

[23:24:31] [Server thread/INFO]: [VotingPlugin] Enabling VotingPlugin v6.3 [23:24:31] [Server thread/WARN]: 4 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Starting... [23:24:31] [Server thread/WARN]: 16 [Server thread] WARN com.bencodez.votingplugin.advancedcore.hikari.util.DriverDataSource - Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation. [23:24:31] [Server thread/WARN]: 29 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Start completed. [23:24:32] [Server thread/INFO]: [VotingPlugin] Enabled VotingPlugin 6.3 [23:24:32] [Server thread/WARN]: [VotingPlugin] Using dev build, this is not a stable build, use at your own risk

Is there any way to fix driver initialization or figure out why it's relying on direct instantiation?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BenCodez/VotingPlugin/issues/1157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECIQN6VYEDRES5TUA5USFLTONNDPANCNFSM45D6WPOQ .

mibby commented 3 years ago

Paper 1.16.5 derivative. I flip between the latest dev builds for Paper, Tuinity, Purpur, & another fork or two for testing.

I assume a fix would be to use the newer non-deprecated mysql driver class if available? Both logblock & a lwc fork I use fixed their mysql driver warnings by implementing this.

            try {
                Class.forName("com.mysql.cj.jdbc.Driver");
            } catch (ClassNotFoundException ignored) {
                Class.forName("com.mysql.jdbc.Driver");
            }
BenCodez commented 3 years ago

I tried that earlier and it didn't make a difference to someone else having that message.

But you can try this: http://bencodez.com/job/VotingPlugin/

mibby commented 3 years ago

Apologies for the delayed testing. Seems to work great, thanks. No more complaining about deprecated driver.

Now if only the thread # and double Server thread prefix could be fixed. :) i.e. [Server thread/WARN]: 17 [Server thread] INFO

BenCodez commented 3 years ago

Where does that double thread prefix issue happen?

mibby commented 3 years ago

During server start-up initialization when the HikariPool is started. It's the only place I've seen VotingPlugin show the thread number and mixed WARN/INFO outputs [Server thread/WARN]: 17 [Server thread].

[15:06:29] [Server thread/INFO]: [VotingPlugin] Enabling VotingPlugin v6.3.2
[15:06:29] [Server thread/WARN]: 2 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Starting...
[15:06:29] [Server thread/WARN]: 17 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Start completed.
[15:06:30] [Server thread/INFO]: [VotingPlugin] Enabled VotingPlugin 6.3.2
[15:06:30] [Server thread/WARN]: [VotingPlugin] Using dev build, this is not a stable build, use at your own risk
BenCodez commented 3 years ago

I have no control over those messages, so nothing I can do about it

On Sun, Jun 6, 2021, 9:12 PM mibby @.***> wrote:

During server start-up initialization when the HikariPool is started. It's the only place I've seen VotingPlugin show the thread number and mixed WARN/INFO outputs [Server thread/WARN]: 17 [Server thread].

[15:06:29] [Server thread/INFO]: [VotingPlugin] Enabling VotingPlugin v6.3.2 [15:06:29] [Server thread/WARN]: 2 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Starting... [15:06:29] [Server thread/WARN]: 17 [Server thread] INFO com.bencodez.votingplugin.advancedcore.hikari.HikariDataSource - HikariPool-1 - Start completed. [15:06:30] [Server thread/INFO]: [VotingPlugin] Enabled VotingPlugin 6.3.2 [15:06:30] [Server thread/WARN]: [VotingPlugin] Using dev build, this is not a stable build, use at your own risk

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BenCodez/VotingPlugin/issues/1157#issuecomment-855509782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECIQN7KIPHVRY5BRTWCX7LTRQMHNANCNFSM45D6WPOQ .

mibby commented 3 years ago

Right, but why would it output the thread number and WARN/INFO status twice on the same line? VotingPlugin is the only plugin that this occurs for out of ~100 I test.

BenCodez commented 3 years ago

It's because of hikari, it's out of my control right now.