Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jail fails to load after creating a new jail with cells, then restarting the server. #41

Closed
ghost opened this issue Jan 27, 2015 · 54 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 27, 2015

Looks like jail is returning an error when it tries to load the flatfile. I've included the error below.

java.lang.NullPointerException
    at com.graywolf336.jail.JailIO.loadJailFromFlatFile(JailIO.java:631) ~[?:?]
    at com.graywolf336.jail.JailIO.loadJails(JailIO.java:578) ~[?:?]
    at com.graywolf336.jail.JailMain.onEnable(JailMain.java:77) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:494) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]

I basically deleted the data.yml file, started up the live server, then created the jail for a fresh file. I then copied the files in the folder over to my local test server, which is an identical copy of my live server, and started it up. The error showed up when I checked the logs to see if the jail loaded successfully.

@graywolf336
Copy link
Owner

Which version of the plugin are you using? More specifically, which build?
On Jan 27, 2015 4:23 PM, "Shiori Tsukimoto" notifications@github.com
wrote:

Looks like jail is returning an error when it tries to load the flatfile.
I've included the error below.

java.lang.NullPointerException
at com.graywolf336.jail.JailIO.loadJailFromFlatFile(JailIO.java:631) ~[?:?]
at com.graywolf336.jail.JailIO.loadJails(JailIO.java:578) ~[?:?]
at com.graywolf336.jail.JailMain.onEnable(JailMain.java:77) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at
net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:494)
[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]

I basically deleted the data.yml file, started up the live server, then
created the jail for a fresh file. I then copied the files in the folder
over to my local test server, which is an identical copy of my live server,
and started it up. The error showed up when I checked the logs to see if
the jail loaded successfully.


Reply to this email directly or view it on GitHub
#41.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

Build #154

@ghost
Copy link
Author

ghost commented Jan 27, 2015

it looks to me like its the same problem we were having with #40. When the server starts the load state for Jail, it attempts to read the data.yml which isn't being formatted correctly, and it throws the error.

@graywolf336
Copy link
Owner

Can you provide the data.yml?
On Jan 27, 2015 4:42 PM, "Shiori Tsukimoto" notifications@github.com
wrote:

it looks to me like its the same problem we were having with #40
#40. When the server starts
the load state for Jail, it attempts to read the data.yml which isn't being
formatted correctly, and it throws the error.


Reply to this email directly or view it on GitHub
#41 (comment).

@ghost
Copy link
Author

ghost commented Jan 27, 2015

yeah, give me a couple of secs to send it from the live server to my mediafire

@ghost
Copy link
Author

ghost commented Jan 27, 2015

@graywolf336
Copy link
Owner

Can you turn debugging on (/togglejaildebug or edit the config) and try with build 155? I just need the debugging output when loading it on your server.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

ok, give me a few moments

@graywolf336
Copy link
Owner

Thanks

@ghost
Copy link
Author

ghost commented Jan 27, 2015

ok, this is pretty much all I got when I started it up with the data.yml from the live server.

[17:31:13] [Server thread/ERROR]: Error occurred while enabling Jail v3.0.0-SNAPSHOT-b155 (Is it up to date?)
java.lang.NullPointerException
    at com.graywolf336.jail.JailIO.loadJailFromFlatFile(JailIO.java:601) ~[?:?]
    at com.graywolf336.jail.JailIO.loadJails(JailIO.java:578) ~[?:?]
    at com.graywolf336.jail.JailMain.onEnable(JailMain.java:77) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:494) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]

@graywolf336
Copy link
Owner

Can you provide the logs before that?

@ghost
Copy link
Author

ghost commented Jan 27, 2015

I can give you the whole log from startup if thats what you want.

@graywolf336
Copy link
Owner

Just the lines from where Jail starts to load until that error is all I really need.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

that was all I got from the log, here is the entire log if you arent sure:

http://www.mediafire.com/download/ilxqosfd2l5pdi6/latest.log

@ghost
Copy link
Author

ghost commented Jan 27, 2015

oh I see it now! Its really hard to see the debug data!

@graywolf336
Copy link
Owner

Okay, you can disable debugging and download the latest build...if you don't mind.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

of course I don't mind, I'm helping someone out! :)

@ghost
Copy link
Author

ghost commented Jan 27, 2015

ok, the clip from the lastest build being run:

[17:44:05] [Server thread/INFO]: [Jail] Enabling Jail v3.0.0-SNAPSHOT-b157
[17:44:05] [Server thread/INFO]: [Jail] Storage type selected: flatfile
[17:44:05] [Server thread/INFO]: [Jail] Loaded the language: en
[17:44:05] [Server thread/ERROR]: [Jail] Failed to load the jail, supermax, because the world Void doesn't exist (is null).
[17:44:05] [Server thread/ERROR]: [Jail] Failed to load the jail, supermaxcells, because the world is not set.
[17:44:05] [Server thread/INFO]: [Jail] Loaded 0 jails.
[17:44:05] [Server thread/INFO]: [Jail] Loaded 0 cells.
[17:44:05] [Server thread/INFO]: [Jail] Loaded 0 prisoners.
[17:44:06] [Server thread/INFO]: [Jail] Using the Bukkit Scheduler.
[17:44:06] [Server thread/WARN]: [Jail] Can't have jail sticks without any jails.
[17:44:06] [Server thread/INFO]: [Jail] Loaded 0 jail sticks.
[17:44:06] [Server thread/INFO]: [Jail] Completed enablement.

@graywolf336
Copy link
Owner

Okay, so you don't have a world Void on your test server do you?

@ghost
Copy link
Author

ghost commented Jan 27, 2015

I do have a world called Void, its a exact duplicate of my live server.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

hmm, I wonder if its a problem with jail talking to worlds generated by Multiverse?

@ghost
Copy link
Author

ghost commented Jan 27, 2015

let me try this on my barebones world. It doesnt have any plugins installed.

@graywolf336
Copy link
Owner

Yes it is, since those worlds aren't loaded yet even though the Jail plugin is set to load POSTWORLD. Let me set the plugin to load after Multiverse.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

ok, then we'll try this again, lol

@graywolf336
Copy link
Owner

Let's try after this build. I just changed up a few things. First, it will load the Jails which their world is disabled/not loaded but the Jail will be disabled. Second, it will load after multiverse.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

ok, sounds good.

@ghost
Copy link
Author

ghost commented Jan 27, 2015

the new build is 158 correct?

@graywolf336
Copy link
Owner

Correct

@ghost
Copy link
Author

ghost commented Jan 28, 2015

oh crud...#158 just crashed and burned...

[17:55:35] [Server thread/INFO]: [Jail] Enabling Jail v3.0.0-SNAPSHOT-b158
[17:55:35] [Server thread/INFO]: [Jail] Storage type selected: flatfile
[17:55:35] [Server thread/INFO]: [Jail] Loaded the language: en
[17:55:35] [Server thread/ERROR]: Error occurred while enabling Jail v3.0.0-SNAPSHOT-b158 (Is it up to date?)
java.lang.NullPointerException
    at com.graywolf336.jail.beans.SimpleLocation.<init>(SimpleLocation.java:44) ~[?:?]
    at com.graywolf336.jail.beans.Cell.setChestLocation(Cell.java:108) ~[?:?]
    at com.graywolf336.jail.JailIO.loadJailFromFlatFile(JailIO.java:638) ~[?:?]
    at com.graywolf336.jail.JailIO.loadJails(JailIO.java:578) ~[?:?]
    at com.graywolf336.jail.JailMain.onEnable(JailMain.java:77) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:335) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.q(MinecraftServer.java:402) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.k(MinecraftServer.java:370) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.a(MinecraftServer.java:325) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:211) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:494) [spigot-1.8-R0.1-SNAPSHOT.jar:git-Spigot-d0d1d87-15e81cf]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]

@graywolf336
Copy link
Owner

Eh, it won't work. Hang on, forgot Multiverse changed their name to Multiverse-Core. And heh, okay that's funny.

@ghost
Copy link
Author

ghost commented Jan 28, 2015

It happens to everyone, its just one of those long restless nights :)

@graywolf336
Copy link
Owner

Here we go, in theory it should work just fine...but let's see let you test it first. 😝

@graywolf336
Copy link
Owner

Did that work or have you yet to try it @madisonofccs?

@ghost
Copy link
Author

ghost commented Jan 28, 2015

oh! sorry, was doing laundry, lol! let me get that build

@graywolf336
Copy link
Owner

Oh that's for sure more important! 😜

@ghost
Copy link
Author

ghost commented Jan 28, 2015

lol, you tease! The build results:

[18:25:08] [Server thread/INFO]: [Jail] Enabling Jail v3.0.0-SNAPSHOT-b159
[18:25:08] [Server thread/INFO]: [Jail] Storage type selected: flatfile
[18:25:08] [Server thread/INFO]: [Jail] Loaded the language: en
[18:25:08] [Server thread/INFO]: [Jail] Loaded jail supermax with 0 prisoners and 16 cells.
[18:25:08] [Server thread/ERROR]: [Jail] Failed to load the jail, supermaxcells, because the world is not set.
[18:25:08] [Server thread/INFO]: [Jail] Loaded 1 jail.
[18:25:08] [Server thread/INFO]: [Jail] Loaded 16 cells.
[18:25:08] [Server thread/INFO]: [Jail] Loaded 0 prisoners.
[18:25:08] [Server thread/INFO]: [Jail] Using the Bukkit Scheduler.
[18:25:08] [Server thread/INFO]: [Jail] Loaded 2 jail sticks.
[18:25:08] [Server thread/INFO]: [Jail] Completed enablement.

looks like you squished that bug! Just have to figure out how to get rid of the extra "jail" thats being generated :)

@graywolf336
Copy link
Owner

Yeah...so are you able to replicate this extra thing 100% of the time?

@ghost
Copy link
Author

ghost commented Jan 28, 2015

yeah, it happens whenever cells are created in the jail, once you do /jail stop it writes that line into data.yml. It might have something to do with how cells are being written into the flatfile.

I can try it with the new build, and see if it does it this time.

@graywolf336
Copy link
Owner

Huh, interesting...wonder where I've messed up to cause this.

@ghost
Copy link
Author

ghost commented Jan 28, 2015

im testing with the build 159 to see if it creates it again.

@graywolf336
Copy link
Owner

I just pushed another change, can you try build 160?

@ghost
Copy link
Author

ghost commented Jan 28, 2015

well, the test with 159 didn't generate the additional "jail", it looks like whatever you did to kill this bug killed that one at the same time

@graywolf336
Copy link
Owner

How many cells did you create? Cause when testing I only created one cell..

@ghost
Copy link
Author

ghost commented Jan 28, 2015

I did the test with 159 creating a new jail called Foo, and giving it 3 cells. When I was done I did /jail stop, and then stopped the server.

@graywolf336
Copy link
Owner

Well yay then! 😄 Thanks for all your help!

@ghost
Copy link
Author

ghost commented Jan 28, 2015

its not a problem, we make a very good team!

@graywolf336
Copy link
Owner

Try to break something else now so I can fix something else haha

@ghost
Copy link
Author

ghost commented Jan 28, 2015

if you ever need anyone to test stuff for you, you have my email already, just give me a shout :)

@graywolf336
Copy link
Owner

Will do, thanks!

@ghost
Copy link
Author

ghost commented Jan 28, 2015

but...but, it works so good now, I don't want to break it again :(

@graywolf336
Copy link
Owner

Fair enough :)

@ghost
Copy link
Author

ghost commented Jan 28, 2015

well, I suppose this is goodbye for now, until I break something again :). You have a good night, and take a break!

@graywolf336
Copy link
Owner

Sounds good to me, I'll be taking a break soon to grab something to eat. 🍔 Thanks again for your help!

@ghost
Copy link
Author

ghost commented Jan 28, 2015

no problem :) have a good one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant