admin-area/Errorhelp

Solving errors and when to report them

How to place useful comments How to install plugins Solving errors and when to report them Reading and writing YAML

Introduction

It is common for you to have a glance over at the server console and you will find that there are tonnes of errors. Or a plugin doesn't work (anymore) and you see errors. This page covers self-help for errors so you don't have to rely on others to fix it.

Error levels

When looking over an error, the first step is knowing the severity of the error. In front of every line of the error message/text you usually find [INFO], [WARNING] or [SEVERE].

  • Messages shown under INFO are just that: information, and you can usually ignore them
  • Messages shown under WARNING are not critical failures of the plugin that would cause it to not work at all, but they do require some attention. It could be some feature is wrongly configured or unsupported in some other way. It could also be warning you for misbehaviour by the server or by a plugin. There is usually no need to report these unless they warn of incompatibility that needs fixing.
  • Messages shown under SEVERE are critical failures of the plugin and require immediate attention. It could be that the plugin couldn't enable at all or that it crashed. When you see these, you really need to start fixing something outside of plugin configuration.

Error format

All errors consist of at least one part: the header that shows what went wrong. This is the most important part of the error. In addition, it may contain some instructions for fixing it. For normal runtime errors it also shows a stack trace.

Error stack traces

Stack traces are very useful for figuring out how the error occurred. Whenever you report an error, be sure to include it, otherwise the developer has no idea how the error even happened. Below is an example of an error you will encounter frequently.

2013-06-01 13:01:22 [SEVERE] Could not pass event PlayerJoinEvent to NoLagg v1.90.0
org.bukkit.event.EventException
 at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
 at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
 at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:26)
 at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:479)
 at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:464)
 at net.minecraft.server.v1_5_R3.PlayerList.c(PlayerList.java:204)
 at net.minecraft.server.v1_5_R3.PlayerList.a(PlayerList.java:100)
 at net.minecraft.server.v1_5_R3.PendingConnection.d(PendingConnection.java:134)
 at net.minecraft.server.v1_5_R3.PendingConnection.c(PendingConnection.java:49)
 at org.spigotmc.MultiplexingServerConnection.b(MultiplexingServerConnection.java:77)
 at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:583)
 at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:227)
 at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:472)
 at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:404)
 at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
Caused by: java.lang.NoClassDefFoundError com/bergerkiller/bukkit/nolagg/NoLaggUtil
 at com.bergerkiller.bukkit.nolagg.chunks.NLCListener.onPlayerJoin(NLCListener.java:23)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
 ... 14 more
Caused by: java.lang.ClassNotFoundException com.bergerkiller.bukkit.nolagg.NoLaggUtil
 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:87)
 at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

Note that the error level is severe, and it is an 'EventException', so it happened while handling an Event. There are many components with 'caused by' and others. When you encounter this, you will find that the last component of the error is most important. In this case, you can see a 'NoClassDefFoundError' exception which occurred in the 'player join' handler of the plugin. Now you could go and report this because you don't know what 'NoClassDefFound' means. This is where more information is really needed to solve these errors yourself.

Reading stack trace lines

For server administrators it is not interesting to know precisely where in the plugin something went wrong, because you don't even know how the plugin is coded. What you may find interesting is to see which methods called what other methods to see which plugins are involved in this 'mess'.

After each 'at' line you can find the class name, method name and source location of that particular point in time. From the class name you can see the package path to this class, which usually includes the plugin author's name and the plugin name. This is useful for figuring out which plugin caused the error. The first stack trace line that shows a plugin path is usually the cause of the error. In case you see another plugin listed below it (implying that that plugin called the other), then that other plugin is just as suspect.

If you see two similarly named classes and methods above each other, like this:

at net.minecraft.server.v1_5_R2.ChunkProviderServer.getChunk
at com.bergerkiller.bukkit.common.internal.ChunkProviderServerHook.getChunk

You can note that the below class probably redirected to the one above. You can then completely ignore the plugin class in most cases, since it did nothing: it just redirected to the method 'below'. If no other plugin-caused error is shown above, then look into whether it isn't an error caused by the server. Could be that a world is corrupted or similar. If that is ruled out, THEN it is time to look into that additional redirecting class. Maybe the author altered something when redirecting?

Error examples and possible solutions

Below are various error headers and their respective solutions they may have.

NoSuchMethod/NoSuchField/NoClassDefFound

This is an exception or error that can only happen in a few instances, sorted in order of probability.

  1. The plugin or a dependency of a plugin is outdated and you need to update. Look for new versions of the plugin and the plugin's dependencies, possibly using development builds if a new version is still being developed. It could also be the plugin was built against a very specific CraftBukkit version and it broke, requiring you to update to a version that is compatible.
  2. You or a plugin 'hotswapped' a plugin jar file while the server was still running, and now at runtime it can no longer find the thing it expected to find. Avoid updating plugins like this, always disable the plugin or stop the server before touching the plugin executable. Reloading does not work!
  3. The plugin or a dependency thereof is not compatible with the server software you are using. Either ask for support or find the downloads compatible with your server software.
  4. Compiler error caused by a mistake by the plugin author. He forgot to build against the right server version, overlooked an error, used an invalid method name or others. These are rare, so don't jump the gun and claim it is this. It is far more likely it is one of the above.

UnknownDependencyException

  1. You need to install a dependency required by a plugin. Inspect the error and find out which plugin requires what, go to the plugin page and download the dependency.

NullPointerException

  1. Plugin runtime error that is the most frequent of them all. The plugin did not expect something to be 'null' or accidentally caused something that is not supposed to be 'null' to be 'null'. ('null' means nothing, non-existing, empty) Although it is up to the plugin to take care of this properly, you as the user can also try to fix it. Let the plugin regenerate the configuration, make sure all worlds stay loaded, use valid names without special characters such as ',' and '/' and possibly fix up mistakes you made in the configuration (non-existing block, world, constant, etc.)

InvalidConfigurationException / YAML File is corrupt

  1. You made a mistake while writing up the configuration for a plugin. Look at the error to see which plugin is involved, and possibly which configuration file. Then find the line and column as stated and fix it there. Common mistakes are to forget quotation marks ( ' ), mistakes in indentation or using the ( $ ) sign without surrounding it by quotation mark signs. The error message should tell more.

IOException

  1. The server crashed and as a result some files ended up corrupted. It resulted in compression errors, invalid format or others. Try letting the plugin or server regenerate the configuration, worlds and other data and restore the files that still appear intact later on. For worlds, there are also tools to fix them for you.
  2. The format of a save file for a plugin changed and now the plugin is unable to load your older format. The error is most likely a one-and-only occurrence, if not, try deleting the save file(s).

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes