Solved FileNotFoundException for world that does not exist

Discussion in 'Spigot Help' started by JoswinJohn1, Jun 12, 2021.

  1. I had a few worlds on my sever, most of them being created from a plugin I made, and I manually deleted them while the sever was running (yes I know that is a horrible idea, I didn't really understand how it could be that bad at the time) the problem now is that every few minutes, in the console it will show an FileNotFoundException and an IOException, I don't need the worlds back, and I don't want them back, but I want to get rid of the exceptions, since they can be very annoying at times, especially since they crowd up Log Files.

    This is the FileNotFoundException:

    Code (Text):
    [Server thread/ERROR]: Could not save data [email protected]
    java.io.FileNotFoundException: ./duels0.42433895552993584/data/raids.dat (No such file or directory)
            at java.io.FileOutputStream.open0(Native Method) ~[?:1.8.0_291]
            at java.io.FileOutputStream.open(FileOutputStream.java:270) ~[?:1.8.0_291]
            at java.io.FileOutputStream.<init>(FileOutputStream.java:213) ~[?:1.8.0_291]
            at java.io.FileOutputStream.<init>(FileOutputStream.java:162) ~[?:1.8.0_291]
            at net.minecraft.server.v1_16_R3.NBTCompressedStreamTools.a(NBTCompressedStreamTools.java:83) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.PersistentBase.a(SourceFile:51) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.WorldPersistentData.a(SourceFile:124) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.WorldServer.aj(WorldServer.java:893) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.WorldServer.save(WorldServer.java:871) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.saveChunks(MinecraftServer.java:794) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1147) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:966) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at java.lang.Thread.run(Thread.java:748) [?:1.8.0_291]
    This is the IOException:

    Code (Text):
    [Server thread/ERROR]: Failed to save level ./duels0.42433895552993584
    java.io.IOException: No such file or directory
            at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[?:1.8.0_291]
            at java.io.File.createTempFile(File.java:2061) ~[?:1.8.0_291]
            at net.minecraft.server.v1_16_R3.Convertable$ConversionSession.a(Convertable.java:328) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.WorldServer.save(WorldServer.java:884) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.saveChunks(MinecraftServer.java:794) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.stop(MinecraftServer.java:861) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.DedicatedServer.stop(DedicatedServer.java:689) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1007) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[spigot-1.16.5.jar:3092-Spigot-9fb885e-ebe18b9]
            at java.lang.Thread.run(Thread.java:748) [?:1.8.0_291]
     
    #1 JoswinJohn1, Jun 12, 2021
    Last edited: Jun 12, 2021
  2. Does your plugin cache worlds in any way? AFAIK at least, Spigot itself doesn't really store information about worlds outside of their respective directories, so I'm thinking this is more plugin-related. (Although I could be wrong)
     
    • Agree Agree x 1
  3. Thanks for the reply but you were right, I tested this out a few more times and looks like one of the plugins I made was causing the problem, since it would delete the world folder while it was loaded. thanks anyways!
     
    • Like Like x 1