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

java.lang.NullPointerException Because of Invalid YAML Paths File #18

Open
squiggie opened this issue Aug 22, 2024 · 0 comments
Open

java.lang.NullPointerException Because of Invalid YAML Paths File #18

squiggie opened this issue Aug 22, 2024 · 0 comments

Comments

@squiggie
Copy link

I was getting the following error and couldn't figure out why.

java.lang.NullPointerException: Cannot invoke "me.armar.plugins.autorank.storage.PlayTimeStorageManager.saveAllStorageProviders()" because the return value of "me.armar.plugins.autorank.Autorank.getPlayTimeStorageManager()" is null
at Autorank-5.2.2.jar/me.armar.plugins.autorank.Autorank.onDisable(Autorank.java:108) ~[Autorank-5.2.2.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:291) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:114) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:550) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:206) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:654) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:603) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:757) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:519) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:363) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1230) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:333) ~[purpur-1.21.jar:1.21-2284-4e55e26]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

I thought this has something to do with the Plugin and so I removed it and added it again and the error went away.

I then started adding my Paths back in and got the error again. So I knew it had to be an issue with the config file but the error didn't represent anything was wrong with the config file. It indicated something completely different, with some kind of Storage Manager issue.

After validating there was an extra ' at the end of my config, and removing it, the error went away.

I'm just giving a heads up in case error reporting could be improved or perhaps some kind of yaml validation could be done on the config files and report that error in the console and save someone hours digging through a yaml file line by line trying to find the issue.

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

No branches or pull requests

1 participant