Make plugin compatible with Java 9 or above
miresru opened this issue ยท 3 comments
Can somebody explain what is this and how to fix it?
On server start:
[13:00:59 INFO]: [TriggerReactor] Enabling TriggerReactor v2.1.8
[13:00:59 INFO]: [TriggerReactor] Enabled support for Vault Vault v1.7.2-b107
[13:00:59 INFO]: [TriggerReactor] Vault permission hooked.
[13:01:00 WARN]: Warning: Nashorn engine is planned to be removed from a future JDK release
... repeated 98 times ...
[13:01:04 WARN]: Warning: Nashorn engine is planned to be removed from a future JDK release
[13:01:04 INFO]: [TriggerReactor] Waiting for previous saving tasks...
[13:01:04 INFO]: [TriggerReactor] Done! now reloading global variables...
[13:01:04 INFO]: [TriggerReactor] Global variables were loaded from var.yml
[13:01:04 ERROR]: Error occurred while enabling TriggerReactor v2.1.8 (Is it up to date?)
java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at io.github.wysohn.triggerreactor.tools.ReflectionUtil.getAllClasses(ReflectionUtil.java:413) ~[TriggerReactor.jar:?]
at io.github.wysohn.triggerreactor.bukkit.manager.trigger.CustomTriggerManager.initEvents(CustomTriggerManager.java:96) ~[TriggerReactor.jar:?]
at io.github.wysohn.triggerreactor.bukkit.manager.trigger.CustomTriggerManager.<init>(CustomTriggerManager.java:79) ~[TriggerReactor.jar:?]
at io.github.wysohn.triggerreactor.bukkit.main.JavaPluginBridge.onEnable(JavaPluginBridge.java:300) ~[TriggerReactor.jar:?]
at io.github.wysohn.triggerreactor.bukkit.main.TriggerReactor.onEnable(TriggerReactor.java:58) ~[TriggerReactor.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:381) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:330) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:422) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:383) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at java.lang.Thread.run(Thread.java:835) [?:?]
On server stop:
[13:02:29 INFO]: [TriggerReactor] Disabling TriggerReactor v2.1.8
[13:02:29 INFO]: [TriggerReactor] Finalizing the scheduled script executions...
[13:02:29 ERROR]: Error occurred while disabling TriggerReactor v2.1.8 (Is it up to date?)
java.lang.NullPointerException: null
at io.github.wysohn.triggerreactor.bukkit.main.JavaPluginBridge.onDisable(JavaPluginBridge.java:385) ~[TriggerReactor.jar:?]
at io.github.wysohn.triggerreactor.bukkit.main.TriggerReactor.onDisable(TriggerReactor.java:65) ~[TriggerReactor.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:361) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:422) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:415) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.disablePlugins(CraftServer.java:349) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at net.minecraft.server.v1_12_R1.MinecraftServer.stop(MinecraftServer.java:465) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:613) [Spigot.jar:git-Spigot-e8ded36-acbc348]
at java.lang.Thread.run(Thread.java:835) [?:?]
I have:
- Java SE Development Kit 12.0.1
- Spigot-1.12.2-79a30d7-20190219-1130
- TriggerReactor-2.1.8
- Vault 1.7.2