EbonJaeger / perworldinventory-kt

Multi-world inventory plugin for Spigot written in Kotlin.
MIT License
46 stars 35 forks source link

Beta 6 Fails to load #36

Closed Frosthaven closed 6 years ago

Frosthaven commented 6 years ago

Note: No economy plugins are installed. Clean install with default options:


# ...

# All settings for players are here:
player:
  # Save and Load players' economy balances. Requires Vault!
  economy: false

# ...
[00:52:41 INFO]: [PerWorldInventory] Enabling PerWorldInventory v2.0.0
[00:52:41 ERROR]: Error occurred while enabling PerWorldInventory v2.0.0 (Is it up to date?)
java.lang.NoClassDefFoundError: Lnet/milkbowl/vault/economy/Economy;
        at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_171]
        at java.lang.Class.privateGetDeclaredFields(Unknown Source) ~[?:1.8.0_171]
        at java.lang.Class.getDeclaredFields(Unknown Source) ~[?:1.8.0_171]
        at me.ebonjaeger.perworldinventory.initialization.di.utils.ReflectionUtils.safeGetDeclaredFields(ReflectionUtils.java:177) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.handlers.instantiation.StandardInjectionProvider.getFieldsToInject(StandardInjectionProvider.java:119) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.handlers.instantiation.StandardInjectionProvider.safeGet(StandardInjectionProvider.java:42) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.handlers.instantiation.DefaultInjectionProvider.safeGet(DefaultInjectionProvider.java:32) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.handlers.instantiation.DirectInstantiationProvider.resolve(DirectInstantiationProvider.java:19) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.findResolutionOrFail(InjectorImpl.java:227) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.resolveContext(InjectorImpl.java:153) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.resolveDependencies(InjectorImpl.java:186) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.resolveContext(InjectorImpl.java:158) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.resolveDependencies(InjectorImpl.java:186) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.resolveContext(InjectorImpl.java:158) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.resolve(InjectorImpl.java:133) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.di.InjectorImpl.getSingleton(InjectorImpl.java:72) ~[?:?]
        at me.ebonjaeger.perworldinventory.initialization.Injector.getSingleton(Injector.kt:67) ~[?:?]
        at me.ebonjaeger.perworldinventory.PerWorldInventory.injectServices$perworldinventory_kt(PerWorldInventory.kt:128) ~[?:?]
        at me.ebonjaeger.perworldinventory.PerWorldInventory.onEnable(PerWorldInventory.kt:88) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:381) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:330) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:422) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:383) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
Caused by: java.lang.ClassNotFoundException: net.milkbowl.vault.economy.Economy
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_171]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:152) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:100) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_171]
        ... 30 more
Frosthaven commented 6 years ago

Installing vault bypasses the bug, which means its a case of trying to read economy even if disabled in config.

EbonJaeger commented 6 years ago

I wonder if this has to do with constructing our EconomyService (required for ProfileManager, which is required by PlayerChangedWorldListener, which is the class that we're actually trying to initialize). Given that no other messages are printed, I'd say that it doesn't get as far as EconomyService#tryLoadEconomy().

@ljacqu I'm not seeing anything obvious here, any ideas?

Fake Edit: I wonder if it has to do with the injector going over the fields, and of course finding the Economy field (a class which wont exist without Vault installed). @Frosthaven could you try it without Vault installed and using the attached version of the plugin? perworldinventory-kt-2.0.0.jar.zip

Frosthaven commented 6 years ago

Verified.

I can confirm that the provided zip loads correctly on a freshly spun up server.

EbonJaeger commented 6 years ago

Fixed by https://github.com/Gnat008/perworldinventory-kt/commit/c124d940c3a2b374dae0535594e58e582ed1bbee accidentally (I forgot I made that change when I added the coverage. Heh). New release incoming.