Updating to 1.9 and save.yml wipes
blablubbabcDEV opened this issue · 13 comments
Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/399
Originally posted by blo0p (Apr 28, 2016):
What steps will reproduce the problem?
- Updating my server from 1.8 to 1.9 along with the corresponding shopkeeper pluginDo you have an error log of what happened?[02:58:16] [Server thread/INFO]: [Shopkeepers] Enabling Shopkeepers v1.71
[02:58:16] [Server thread/INFO]: [Shopkeepers] Citizens found, enabling NPC shopkeepers.
[02:58:17] [Server thread/ERROR]: Error occurred while enabling Shopkeepers v1.71 (Is it up to date?)
java.lang.NullPointerException
  at com.nisovin.shopkeepers.shoptypes.offers.PriceOffer.loadFromConfigOld(PriceOffer.java:106) ~[?:?]
  at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopkeeper.load(NormalPlayerShopkeeper.java:215) ~[?:?]
  at com.nisovin.shopkeepers.Shopkeeper.initOnLoad(Shopkeeper.java:57) ~[?:?]
  at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopkeeper.(NormalPlayerShopkeeper.java:193) ~[?:?]
  at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopType.loadShopkeeper(NormalPlayerShopType.java:21) ~[?:?]
  at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopType.loadShopkeeper(NormalPlayerShopType.java:12) ~[?:?]
  at com.nisovin.shopkeepers.ShopkeepersPlugin.load(ShopkeepersPlugin.java:1305) ~[?:?]
  at com.nisovin.shopkeepers.ShopkeepersPlugin.onEnable(ShopkeepersPlugin.java:236) ~[?:?]
  at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[craftbukkit.jar:git-Bukkit-935f18b]
  at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [craftbukkit.jar:git-Bukkit-935f18b]
  at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit.jar:git-Bukkit-935f18b]
  at org.bukkit.craftbukkit.v1_9_R1.CraftServer.loadPlugin(CraftServer.java:346) [craftbukkit.jar:git-Bukkit-935f18b]
  at org.bukkit.craftbukkit.v1_9_R1.CraftServer.enablePlugins(CraftServer.java:318) [craftbukkit.jar:git-Bukkit-935f18b]
  at net.minecraft.server.v1_9_R1.MinecraftServer.t(MinecraftServer.java:403) [craftbukkit.jar:git-Bukkit-935f18b]
  at net.minecraft.server.v1_9_R1.MinecraftServer.l(MinecraftServer.java:368) [craftbukkit.jar:git-Bukkit-935f18b]
  at net.minecraft.server.v1_9_R1.MinecraftServer.a(MinecraftServer.java:323) [craftbukkit.jar:git-Bukkit-935f18b]
  at net.minecraft.server.v1_9_R1.DedicatedServer.init(DedicatedServer.java:241) [craftbukkit.jar:git-Bukkit-935f18b]
  at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:506) [craftbukkit.jar:git-Bukkit-935f18b]
  at java.lang.Thread.run(Thread.java:744) [?:1.7.0_55]
Originally commented by blablubbabc (Apr 28, 2016):
Do you have a backup of your save.yml file? If so, could you upload that?
I currently can only explain this with a somehow corrupted save.yml file.
Have you manually modified the save file? Are there any other errors?
Originally commented by blo0p (Apr 28, 2016):
Strange, it edited my savefile again.
This time the plugin had a slightly different error when loading:
2:26:14 PM Shopkeepers: Enabling Shopkeepers v1.71
2:26:14 PM Shopkeepers: Citizens found, enabling NPC shopkeepers.
2:26:15 PM CONSOLE: ERROR]: Error occurred while enabling Shopkeepers v1.71 (Is it up to date?)
I'm starting to think it might be something with my Citizen NPC shops? I know we had those on the server. Citizens is up to date and functioning properly
It didn't fully wipe the file, maybe what it left behind gives a clue to what went wrong? I'll attach that save.yml as well
Thanks for helping with this! I appreciate it :D
Originally commented by blablubbabc (Apr 28, 2016):
[at]blo0p:
Could you upload the full error stack trace for your second error?
Anyways, I tried with the corrected save file erlier and there it loaded it just fine. It however removed a few (2) shops which were placed at the same location.
Edited Apr 28, 2016
Originally commented by blo0p (Apr 28, 2016):
[at]blablubbabc:
I should have a good assortment of backups if this one isn't working, but this save was one that was confirmed to be working properly before today.
I hope its just user error on my part as usual and not just an unrecoverable save.
Originally commented by blablubbabc (Apr 28, 2016):
[at]blo0p:
Okay, I have made a quick search through your save file and found at least the following errors in it:
line 2885: A Lost Ruin: 1
s: 1
a: 1
line 5923: missing item
line 13758: On Canned Food: 1
line 21140: missing item
line 21821: missing item
line 23120: missing item
line 36120: missing item
I used NotepaddPlusPlus to find those. You can search for the text above to find them and for ':\n amount:' with 'regex-search' enabled, to find the missing item errors.
To get it working for now you will have to fix those errors by hand: Remove the sections where it is missing an item, and in the case of the other errors with the weird text in them remove those as well and replace the costs section with 'costs: {}'.
Alternatively, I have uploaded a fixed version of your save file here: http://blablubbabc.de/daten/save_fixed.yml
However, I have no idea how you ended up with those errors in your save file..
I will add a few additional checks in the next version of Shopkeepers to automatically filter out those erroneous sections.
Originally commented by blablubbabc (Apr 28, 2016):
[at]blo0p:
That's the same error. Make sure that you have corrected all errors I mentioned below in your saves file.
Originally commented by blo0p (Apr 28, 2016):
[at]blo0p:
I tried placing the save with the server running and using /shopkeepers reload
Overwrites the save instantly and this is the only thing in the log:
[17:11:42] [Server thread/INFO]: blo0p issued server command: /shopkeepers reload
[17:11:42] [Server thread/INFO]: [Shopkeepers] Citizens found, enabling NPC shopkeepers.
[17:11:42] [Server thread/INFO]: class com.nisovin.shopkeepers.shopobjects.CitizensShopkeeperTrait
[at]blablubbabc:
Originally commented by blo0p (Apr 28, 2016):
[at]blablubbabc:
I was using your modified save file though, I'll try combing through it for more errors
Originally commented by blo0p (Apr 28, 2016):
[at]blablubbabc:
[17:05:06] [Server thread/INFO]: [Shopkeepers] Enabling Shopkeepers v1.71
[17:05:06] [Server thread/INFO]: [Shopkeepers] Citizens found, enabling NPC shopkeepers.
[17:05:07] [Server thread/ERROR]: Error occurred while enabling Shopkeepers v1.71 (Is it up to date?)
java.lang.NullPointerException
at com.nisovin.shopkeepers.shoptypes.offers.PriceOffer.loadFromConfigOld(PriceOffer.java:106) ~[?:?]
at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopkeeper.load(NormalPlayerShopkeeper.java:215) ~[?:?]
at com.nisovin.shopkeepers.Shopkeeper.initOnLoad(Shopkeeper.java:57) ~[?:?]
at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopkeeper.(NormalPlayerShopkeeper.java:193) ~[?:?]
at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopType.loadShopkeeper(NormalPlayerShopType.java:21) ~[?:?]
at com.nisovin.shopkeepers.shoptypes.NormalPlayerShopType.loadShopkeeper(NormalPlayerShopType.java:12) ~[?:?]
at com.nisovin.shopkeepers.ShopkeepersPlugin.load(ShopkeepersPlugin.java:1305) ~[?:?]
at com.nisovin.shopkeepers.ShopkeepersPlugin.onEnable(ShopkeepersPlugin.java:236) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[craftbukkit.jar:git-Bukkit-935f18b]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [craftbukkit.jar:git-Bukkit-935f18b]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:404) [craftbukkit.jar:git-Bukkit-935f18b]
at org.bukkit.craftbukkit.v1_9_R1.CraftServer.loadPlugin(CraftServer.java:346) [craftbukkit.jar:git-Bukkit-935f18b]
at org.bukkit.craftbukkit.v1_9_R1.CraftServer.enablePlugins(CraftServer.java:318) [craftbukkit.jar:git-Bukkit-935f18b]
at net.minecraft.server.v1_9_R1.MinecraftServer.t(MinecraftServer.java:403) [craftbukkit.jar:git-Bukkit-935f18b]
at net.minecraft.server.v1_9_R1.MinecraftServer.l(MinecraftServer.java:368) [craftbukkit.jar:git-Bukkit-935f18b]
at net.minecraft.server.v1_9_R1.MinecraftServer.a(MinecraftServer.java:323) [craftbukkit.jar:git-Bukkit-935f18b]
at net.minecraft.server.v1_9_R1.DedicatedServer.init(DedicatedServer.java:241) [craftbukkit.jar:git-Bukkit-935f18b]
at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:506) [craftbukkit.jar:git-Bukkit-935f18b]
at java.lang.Thread.run(Thread.java:744) [?:1.7.0_55]
Originally commented by blablubbabc (May 1, 2016):
I made some changes so that this should no longer cause an issue in v1.72. Invalid offers should now better taken care of.
Originally commented by blablubbabc (Apr 28, 2016):
[at]blo0p:
Okay, it seems that the save file I uploaded still contained a few of the below mentioned errors. I uploaded the corrected (and tested) version here: blablubbabc.de/daten/save.yml.dat
I also changed the file name ending to .dat so that it offers you to download the file, instead of displaying the file contents. Because when copying from the displayed contents it would mess up special characters.
Edited Apr 28, 2016
Originally commented by blo0p (Apr 29, 2016):
[at]blablubbabc:
You did it!
Thanks a bunch!