awumii / EpicGuard

🛡 Bot protection system for Minecraft servers. | Outdated, use: https://github.com/4drian3d/EpicGuard
GNU General Public License v3.0
93 stars 22 forks source link

[MySQL] java.lang.NullPointerException #120

Closed Stixil closed 3 years ago

Stixil commented 3 years ago

[02:53:06 INFO]: This server is running Waterfall version git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449 by md_5

Startup Error: [03:00:32 WARN]: Exception encountered when loading plugin: EpicGuard java.lang.NullPointerException: Cannot invoke "me.xneox.epicguard.core.EpicGuard.logger()" because the return value of "me.xneox.epicguard.core.EpicGuardAPI.instance()" is null at me.xneox.epicguard.core.util.ExceptionUtils.report(ExceptionUtils.java:9) ~[?:?] at me.xneox.epicguard.core.storage.StorageManager.(StorageManager.java:47) ~[?:?] at me.xneox.epicguard.core.EpicGuard.startup(EpicGuard.java:65) ~[?:?] at me.xneox.epicguard.core.EpicGuard.(EpicGuard.java:55) ~[?:?] at me.xneox.epicguard.waterfall.EpicGuardWaterfall.onEnable(EpicGuardWaterfall.java:48) ~[?:?] at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:315) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.BungeeCord.start(BungeeCord.java:290) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449]

Shutdown Error: [02:52:28 ERROR]: Exception disabling plugin EpicGuard java.lang.NullPointerException: Cannot invoke "me.xneox.epicguard.core.EpicGuard.shutdown()" because "this.epicGuard" is null at me.xneox.epicguard.waterfall.EpicGuardWaterfall.onDisable(EpicGuardWaterfall.java:65) ~[?:?] at net.md_5.bungee.BungeeCord.independentThreadStop(BungeeCord.java:474) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.BungeeCord.access$000(BungeeCord.java:100) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.BungeeCord$5.run(BungeeCord.java:414) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449]

awumii commented 3 years ago

Download this build: https://github.com/xxneox/EpicGuard/suites/3871122794/artifacts/96305870 It should show you a more detailed error about why it can't connect to the database

Stixil commented 3 years ago

Thanks! I have tried the new version and here is the new error on DB connection:

[21:16:06 INFO] [EpicGuard]: Running on: Waterfall-git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449 [21:16:06 INFO] [EpicGuard]: Loading configuration... [21:16:06 INFO] [EpicGuard]: Initializing managers... [21:16:06 INFO] [EpicGuard]: This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com [21:16:06 INFO] [DB]: Connecting to Database: mysql://172.18.1.1:3306/epicguard [21:16:06 INFO] [me.xneox.epicguard.libs.hikari.HikariDataSource]: DB - Starting... [21:16:06 INFO] [me.xneox.epicguard.libs.hikari.pool.HikariPool]: DB - Added connection com.mysql.jdbc.JDBC4Connection@3da12ba4 [21:16:06 INFO] [me.xneox.epicguard.libs.hikari.HikariDataSource]: DB - Start completed. [21:16:06 ERROR] [EpicGuard]: An error occurred in EpicGuard! [21:16:06 ERROR] [EpicGuard]: > Details: Could not load data from SQL database [21:16:06 ERROR] [EpicGuard]: > Platform: Waterfall-git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449 [21:16:06 ERROR] [EpicGuard]: > Stacktrace: [21:16:06 ERROR] [EpicGuard]: java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class java.lang.Number (java.lang.Boolean and java.lang.Number are in module java.base of loader 'bootstrap') at me.xneox.epicguard.libs.idb.DbRow.getInt(DbRow.java:73) ~[?:?] at me.xneox.epicguard.core.storage.SQLDatabase.loadData(SQLDatabase.java:73) ~[?:?] at me.xneox.epicguard.core.storage.StorageManager.(StorageManager.java:46) ~[?:?] at me.xneox.epicguard.core.EpicGuard.startup(EpicGuard.java:70) ~[?:?] at me.xneox.epicguard.core.EpicGuard.(EpicGuard.java:58) ~[?:?] at me.xneox.epicguard.waterfall.EpicGuardWaterfall.onEnable(EpicGuardWaterfall.java:48) ~[?:?] at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:315) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.BungeeCord.start(BungeeCord.java:290) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[server.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:306121c:449] [21:16:06 INFO] [EpicGuard]: Initializing LogFilter... [21:16:06 INFO] [EpicGuard]: Scheduling tasks... [21:16:06 INFO] [EpicGuard]: Startup completed successfully. Welcome to EpicGuard v7.1.0 [21:16:06 INFO] [EpicGuard]: Order of the detection pipeline: LockdownCheck, BlacklistCheck, NicknameCheck, GeographicalCheck, ServerListCheck, ReconnectCheck, AccountLimitCheck, NameSimilarityCheck, ProxyCheck [21:16:06 INFO]: Enabled plugin EpicGuard version 7.1.0 by neox

There is no error on shutdown.

awumii commented 3 years ago

Try this jar: EpicGuardWaterfall-7.1.0-UNPACK.zip

awumii commented 3 years ago

Fixed in the latest build