Shopkeepers

Shopkeepers

2M Downloads

Error Saving of shopkeepers failed

Lupancham opened this issue ยท 3 comments

commented

Not a bug but this is what happened

[18:40:37 ERROR]: [Shopkeepers] Saving of shopkeepers failed! Data might have been lost! :(
com.nisovin.shopkeepers.storage.SKShopkeeperStorage$ShopkeeperStorageSaveException: Missing write permission for directory plugins\Shopkeepers\data
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.wrapException(SKShopkeeperStorage.java:1006) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.wrapException(SKShopkeeperStorage.java:1011) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.doSaveToFile(SKShopkeeperStorage.java:929) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.lambda$saveToFile$0(SKShopkeeperStorage.java:876) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.java.VoidCallable.call(VoidCallable.java:24) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.java.VoidCallable.call(VoidCallable.java:16) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.java.Retry.retry(Retry.java:83) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.saveToFile(SKShopkeeperStorage.java:875) [Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.execute(SKShopkeeperStorage.java:858) [Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.bukkit.SingletonTask.doExecuteTask(SingletonTask.java:435) [Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.bukkit.SingletonTask.executeTask(SingletonTask.java:415) [Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.bukkit.SingletonTask.access$700(SingletonTask.java:28) [Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.bukkit.SingletonTask$2.run(SingletonTask.java:379) [Shopkeepers-2.13.3.jar:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:81) [spigot-1.17.jar:3170-Spigot-a483d2c-ec116f6]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [spigot-1.17.jar:3170-Spigot-a483d2c-ec116f6]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.io.IOException: Missing write permission for directory plugins\Shopkeepers\data
at com.nisovin.shopkeepers.util.java.FileUtils.checkIsDirectoryWritable(FileUtils.java:61) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.lambda$doSaveToFile$3(SKShopkeeperStorage.java:929) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.java.VoidCallable.call(VoidCallable.java:24) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.util.java.VoidCallable.call(VoidCallable.java:16) ~[Shopkeepers-2.13.3.jar:?]
at com.nisovin.shopkeepers.storage.SKShopkeeperStorage$SaveTask.wrapException(SKShopkeeperStorage.java:1004) ~[Shopkeepers-2.13.3.jar:?]
... 17 more

commented

Check the file permissions of the plugins\Shopkeepers\data folder and parent folders. The server process needs the write and access permissions to this folder in order to be able to write the save file.

commented

it is i was running it off a usb drive that was the problem

so i was making a server for my teacher that he can use to the other students and was making it in aa usb so it didn't save
lmao sorry

commented

Okay, good to hear you figured out the issue.

But nevertheless, it should be possible to setup the file permissions for the usb drive so that the server can successfully write to that folder. This may depend on the file system you are using for the usb drive (some file systems, like FAT, don't even support file permissions), and on how it is mounted (the mount point may have its own permissions that then apply to the mounted drive).
I briefly tested this on my Windows system with both a FAT and NTFS formatted usb drive and had no issues with running the server from the usb drive.
But how this needs to be setup in your case depends on your operating and file system.