GeyserMC / Floodgate

Hybrid mode plugin to allow for connections from Geyser to join online mode servers.
https://geysermc.org
MIT License
563 stars 168 forks source link

dev2.1.1 is not compatible with skript-db #296

Closed juzijun233 closed 2 years ago

juzijun233 commented 2 years ago

I tried to use dev2.1.1 due to the issue of #272 , But when I installed skript-DB (https://www.spigotmc.org/resources/skript-db-updated.89363/), floodgate reported an error

[11:34:51] [Server thread/WARN]: [floodgate] Loaded class org.mariadb.jdbc.MariaDbPoolDataSource from skript-db v1.3.6 which is not a depend, softdepend or loadbefore of this plugin.
[11:34:51] [Server thread/INFO]: [floodgate] Connecting to a MySQL-like database...
[11:34:52] [Server thread/ERROR]: [org.bukkit.craftbukkit.v1_16_R3.CraftServer] Unable to provision, see the following errors:

1) [Guice/ErrorInjectingMethod]: NoSuchMethodError: 'void MariaDbPoolDataSource.setServerName(String)'
  at FloodgatePlatform.init(FloodgatePlatform.java:84)
  while locating SpigotPlatform

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_METHOD

1 error

======================
Full classname legend:
======================
FloodgatePlatform:     "org.geysermc.floodgate.FloodgatePlatform"
MariaDbPoolDataSource: "org.mariadb.jdbc.MariaDbPoolDataSource"
SpigotPlatform:        "org.geysermc.floodgate.SpigotPlatform"
========================
End of classname legend:
========================
 initializing floodgate v2.1.1-SNAPSHOT (b40-c10561d) (Is it up to date?)
org.geysermc.floodgate.shadow.com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInjectingMethod]: NoSuchMethodError: 'void MariaDbPoolDataSource.setServerName(String)'
  at FloodgatePlatform.init(FloodgatePlatform.java:84)
  while locating SpigotPlatform

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_METHOD

1 error

======================
Full classname legend:
======================
FloodgatePlatform:     "org.geysermc.floodgate.FloodgatePlatform"
MariaDbPoolDataSource: "org.mariadb.jdbc.MariaDbPoolDataSource"
SpigotPlatform:        "org.geysermc.floodgate.SpigotPlatform"
========================
End of classname legend:
========================

    at org.geysermc.floodgate.shadow.com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1103) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1138) ~[?:?]
    at org.geysermc.floodgate.SpigotPlugin.onLoad(SpigotPlugin.java:57) ~[?:?]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:399) ~[patched_1.16.5.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
    at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NoSuchMethodError: 'void org.mariadb.jdbc.MariaDbPoolDataSource.setServerName(java.lang.String)'
    at org.geysermc.floodgate.database.MysqlDatabase.load(MysqlDatabase.java:71) ~[?:?]
    at org.geysermc.floodgate.link.PlayerLinkLoader.load(PlayerLinkLoader.java:185) ~[?:?]
    at org.geysermc.floodgate.FloodgatePlatform.init(FloodgatePlatform.java:100) ~[?:?]
    at org.geysermc.floodgate.FloodgatePlatform$$FastClassByGuice$$6024064.GUICE$TRAMPOLINE(<generated>) ~[?:?]
    at org.geysermc.floodgate.FloodgatePlatform$$FastClassByGuice$$6024064.apply(<generated>) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:50) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:87) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:146) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:124) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296) ~[?:?]
    at org.geysermc.floodgate.shadow.com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1100) ~[?:?]
    ... 7 more
Tim203 commented 2 years ago

Did you try to compile Floodgate yourself? Because both the latest master build and the latest 2.1.1 build of floodgate-mysql-database does have the mariadb dependency properly relocated

juzijun233 commented 2 years ago

Did you try to compile Floodgate yourself? Because both the latest master build and the latest 2.1.1 build of floodgate-mysql-database does have the mariadb dependency properly relocated

No, I don't know java development.

Tim203 commented 2 years ago

Could you try downloading the latest floodgate mysql database jar and replace the current one?

juzijun233 commented 2 years ago

Could you try downloading the latest floodgate mysql database jar and replace the current one?

I replaced and everything works now~