Latest changes in spigot (snakeyaml 1.19) break EssentialsX
mirolm opened this issue ยท 23 comments
Spigot: latest build Spigot-95dd097-c3047a5
EssentialsX: latest jenkins build #541
Alter last rebuild of spigot EssentialsX produces this exception:
[11:02:48] [Craft Scheduler Thread - 1/WARN]: [Essentials] Plugin Essentials v2.0.1-bSNAPSHOT generated an exception while executing task 10
org.yaml.snakeyaml.constructor.ConstructorException: Can't construct a java object for tag:yaml.org,2002:com.earth2me.essentials.settings.Spawns; exception=java.lang.NoSuchFieldException: typeDefinitions
in 'reader', line 1, column 1:
spawns:
^at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:313) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:207) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:196) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:161) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:147) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:524) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at org.yaml.snakeyaml.Yaml.load(Yaml.java:467) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at com.earth2me.essentials.storage.YamlStorageReader.load(YamlStorageReader.java:41) ~[?:?] at com.earth2me.essentials.storage.AbstractDelayedYamlFileReader.run(AbstractDelayedYamlFileReader.java:33) ~[?:?] at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) [spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: org.yaml.snakeyaml.error.YAMLException: java.lang.NoSuchFieldException: typeDefinitions
at com.earth2me.essentials.storage.BukkitConstructor$ConstructBukkitMapping.constructJavaBean2ndStep(BukkitConstructor.java:231) ~[?:?]
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:149) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5]
at com.earth2me.essentials.storage.BukkitConstructor$ConstructBukkitMapping.construct(BukkitConstructor.java:217) ~[?:?]
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:308) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5]
... 13 more
Caused by: java.lang.NoSuchFieldException: typeDefinitions
at java.lang.Class.getDeclaredField(Class.java:2070) ~[?:1.8.0_152]
at com.earth2me.essentials.storage.BukkitConstructor$ConstructBukkitMapping.constructJavaBean2ndStep(BukkitConstructor.java:224) ~[?:?]
at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:149) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5]
at com.earth2me.essentials.storage.BukkitConstructor$ConstructBukkitMapping.construct(BukkitConstructor.java:217) ~[?:?]
at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:308) ~[spigot-1.12.2.jar:git-Spigot-95dd097-c3047a5]
... 13 more
When i rollback to previous spigot build (Spigot-5695bca-53fccdf) everything works fine.
Confirmed as well. It breaks all versions of EssentialsX back to at least 532 (oldest I had available).
I reported to Spigot as well and this is the closure of the issue response:
"EssentialsX using reflection to bypass API
https://github.com/drtshock/Essentials/blob/5136eb84f4de71355ec146714ea3e487714f7288/Essentials/src/com/earth2me/essentials/storage/BukkitConstructor.java#L225
We cannot support / guarantee non breakage plugins which use reflection to bypass API."
Same here @drtshock Any way to update it?
Thank you
I try with PaperSpigot-1.12.2-b1248.jar and it works fine. The latest build was B1250.
I will wait before updating my servers into the latest build ;)
yeah seriously, why is this referring to 1632 and closed and 1632 points to 1631 and also closed. Has the issue been resolved? Nothing indicates that either way and multiple users reporting the same problem in this (the first ticket).
according to the red Closed 3 posts up, it was closed. :-) Guess its confusing having the label there as Closed, but main thread at the top shows open.
It's a notice that this ticket was referenced in another ticket. That ticket, #1632, was closed, this one is still open.
@SupaHam - any idea when this can be investigated or fixed?
Thanks,
Steve
I reverted back to 10/19/2017 build for 1.12.2 and it works fine from there. Given the recent changes on Spigot's side and BungeeCord specifically for the snakeyaml statement, anything prior to the change should work fine.
thanks everyone, this is a model example of great collaboration across teams. Nicely done! :-)
@smmmadden @Kakifrucht @maxlehot1234
Sorry guys, I didn't mean to create any confusion. I did not resolve the issue, I simply closed #1632 in favor of this one since it was already open, which I didn't realize was the same issue until I had already created mine. It was only open for about a minute, I didn't expect it to cause confusion. Sorry again.
As far as I can tell, this was caused by Spigot updating a dependency to a newer, breaking version without any warning. This is not Spigot's fault (though this code has worked for around 6 years).
The BungeeCord code changes are not pertinent to the EssentialsX issue - EssentialsX does not interact with the BungeeCord API.
I can't promise that I will be able to look into this any time soon, so for now the best option is to revert to an older Spigot/Paper version until we can fix it in EssentialsX.
Spigot-essentials has fixed the issue, so essentials X must be able to as well. https://hub.spigotmc.org/jenkins/job/spigot-essentials/24/