Aelysium-Group / rusty-connector

A player and server connection manager for Velocity based Minecraft Networks!
GNU General Public License v3.0
77 stars 17 forks source link

MySQL doesn't work with Static Families #36

Closed expxx closed 1 year ago

expxx commented 1 year ago

There was an issue with MySQL! Cannot invoke "group.aelysium.rustyconnector.plugin.velocity.central.Processor.services()" because "this.processor" is null

The MySQL details are accurate, but not connecting properly. Doesn't even tell me what the issue with MySQL is.

Trace:


[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.VelocityAPI.services(VelocityAPI.java:188)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.lib.database.HomeServerMappingsDatabase.updateValidExpirations(HomeServerMappingsDatabase.java:179)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.lib.family.StaticServerFamily.updateMappingExpirations(StaticServerFamily.java:81)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.lib.family.StaticServerFamily.init(StaticServerFamily.java:190)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.Processor.init(Processor.java:135)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.VelocityAPI.configureProcessor(VelocityAPI.java:107)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.VelocityLifecycle.loadConfigs(VelocityLifecycle.java:90)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.VelocityLifecycle.start(VelocityLifecycle.java:29)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.VelocityRustyConnector.onLoad(VelocityRustyConnector.java:40)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.Lmbda$48.execute(Unknown Source)
[12:55:19 ERROR]:       at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56)
[12:55:19 ERROR]:       at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597)
[12:55:19 ERROR]:       at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478)
[12:55:19 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[12:55:19 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[12:55:19 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:833)
[12:55:19 ERROR]: java.lang.RuntimeException: There was an issue with MySQL! Cannot invoke "group.aelysium.rustyconnector.plugin.velocity.central.Processor.services()" because "this.processor" is null
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.lib.family.StaticServerFamily.init(StaticServerFamily.java:193)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.Processor.init(Processor.java:135)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.VelocityAPI.configureProcessor(VelocityAPI.java:107)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.VelocityLifecycle.loadConfigs(VelocityLifecycle.java:90)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.central.VelocityLifecycle.start(VelocityLifecycle.java:29)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.VelocityRustyConnector.onLoad(VelocityRustyConnector.java:40)
[12:55:19 ERROR]:       at group.aelysium.rustyconnector.plugin.velocity.Lmbda$48.execute(Unknown Source)
[12:55:19 ERROR]:       at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56)
[12:55:19 ERROR]:       at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597)
[12:55:19 ERROR]:       at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478)
[12:55:19 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[12:55:19 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[12:55:19 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:833)```
nathan-i-martin commented 1 year ago

Can you send a full server log? Use something like pastebin

expxx commented 1 year ago

Sure. https://pastebin.com/KGWPFzx0

nathan-i-martin commented 1 year ago

I've identified the issue. I'm currently OOO until next week but I'll work on it if I can

expxx commented 1 year ago

Is there anything I can do to fix it now or do I have to wait for you?

nathan-i-martin commented 1 year ago

If you'd like you could certainly submit a PR with the fix. Basically there's a resource (called Processor) which is attempting to be accessed during plugin boot which doesn't actually exist yet. So if we use dependency injection to import the MySQL provider instead of accessing it via the API, that should fix the issue!

nathan-i-martin commented 1 year ago

Thanks for your patience on this! I'm planning on pushing the fix for this out with v0.7.0 since it's right around the corner! Be sure to join our discord to get notified once it drops!

nathan-i-martin commented 1 year ago

Fixed as of https://github.com/Aelysium-Group/rusty-connector/commit/1270923caee55e5083b66e6a65d695911d800358 Fix will be released alongside v0.7