Reading Console Error Logs - and fixing the errors.

Warning: This post contains the use of profanity to get a point across about how seriously screwed up some stuff is. You've been warned. (Oh no!)

So, a lot of people apparently don't know how to read error logs... This sadly is a First World Problem (Insert joke here).

Today I'm be going over the basics of reading error logs, and how you can diagnose them so us Developers of Addons (etc.) can make fixes quickly and easily.

Example 1: Wrong Java Version


[?:1.7.0_51]
07.09 16:26:41 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
07.09 16:26:41 [Server] INFO at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_51]
07.09 16:26:41 [Server] INFO at java.net.URLClassLoader.access$100(Unknown Source) ~[?:1.7.0_51]
07.09 16:26:41 [Server] INFO at java.net.URLClassLoader.defineClass(Unknown Source) ~[?:1.7.0_51]
07.09 16:26:41 [Server] INFO at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:1.7.0_51]
07.09 16:26:41 [Server] INFO at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:1.7.0_51]
07.09 16:26:41 [Server] INFO at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_51]
07.09 16:26:41 [Server] INFO Caused by: java.lang.UnsupportedClassVersionError: pl/piratjsk/piratesk/PirateSK : Unsupported major.minor version 52.0
07.09 16:26:41 [Server] INFO at java.lang.Thread.run(Unknown Source) [?:1.7.0_51]
07.09 16:26:41 [Server] INFO at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:494) [spigot_1.8_eb39b47-0899683.jar:git-Spigot-eb39b47-0899683]
07.09 16:26:41 [Server] INFO at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:152) [spigot_1.8_eb39b47-0899683.jar:git-Spigot-eb39b47-0899683]
07.09 16:26:41 [Server] INFO at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:290) [spigot_1.8_eb39b47-0899683.jar:git-Spigot-eb39b47-0899683]
07.09 16:26:41 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot_1.8_eb39b47-0899683.jar:git-Spigot-eb39b47-0899683]
07.09 16:26:41 [Server] INFO at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot_1.8_eb39b47-0899683.jar:git-Spigot-eb39b47-0899683]
07.09 16:26:41 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot_1.8_eb39b47-0899683.jar:git-Spigot-eb39b47-0899683]
07.09 16:26:41 [Server] INFO org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: pl/piratjsk/piratesk/PirateSK : Unsupported major.minor version 52.0



Here is an example of PirateSk being loaded on a server without the right version of Java. (Error log was taken from here.)

What we're looking for here is
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: pl/piratjsk/piratesk/PirateSK : Unsupported major.minor version 52.0


The "Unsupported major.minor version 52.0" tells us that the plugin we're trying to load isn't supported by the version of Java that our server is running, and should probably be updated.

Plugins like PirateSk, RandomSk, and *if I forget to build Umbaska with Java 7*, Umbaska require your server to have Java 8 installed, not Java 7.

Example 2: NoClassDefFound


[04:27:13] [Server thread/WARN]: [Skript] Task #428 for Skript v2.2-SNAPSHOT generated an exception
java.lang.NoClassDefFoundError: net/minecraft/server/v1_8_R1/GenericAttributes
at uk.co.umbaska.Enums.Attributes.<clinit>(Attributes.java:10) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.Class.getEnumConstantsShared(Unknown Source) ~[?:1.8.0_45]
at java.lang.Class.enumConstantDirectory(Unknown Source) ~[?:1.8.0_45]
at java.lang.Enum.valueOf(Unknown Source) ~[?:1.8.0_45]
at uk.co.umbaska.Utils.EnumClassInfo$1.parse(EnumClassInfo.java:70) ~[?:?]
at uk.co.umbaska.Utils.EnumClassInfo$1.parse(EnumClassInfo.java:57) ~[?:?]
at ch.njol.skript.registrations.Classes.parseSimple(Classes.java:400) ~[?:?]
at ch.njol.skript.registrations.Classes.parse(Classes.java:429) ~[?:?]
at ch.njol.skript.lang.UnparsedLiteral.getConvertedExpression(UnparsedLiteral.java:97) ~[?:?]
at ch.njol.skript.lang.UnparsedLiteral.getConvertedExpression(UnparsedLiteral.java:86) ~[?:?]
at ch.njol.skript.lang.UnparsedLiteral.getConvertedExpression(UnparsedLiteral.java:1) ~[?:?]
at ch.njol.skript.conditions.CondCompare.init(CondCompare.java:174) ~[?:?]
at ch.njol.skript.conditions.CondCompare.init(CondCompare.java:126) ~[?:?]
at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:244) ~[?:?]
at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:171) ~[?:?]
at ch.njol.skript.lang.Condition.parse(Condition.java:83) ~[?:?]
at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:729) ~[?:?]
at ch.njol.skript.command.Commands.loadCommand(Commands.java:466) ~[?:?]
at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:469) ~[?:?]
at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:245) ~[?:?]
at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:199) ~[?:?]
at ch.njol.skript.Skript$2.run(Skript.java:391) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:726) [spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367) [spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) [spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) [spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_8_R1.GenericAttributes
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:91) ~[spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_45]
... 33 more



This one is an easy one to diagnose. At first glance, we can tell that this server is running Spigot 1.8.7 by the following [spigot-1.8.7.jar:git-Spigot-3ccbe77-a6a57a9]. The way that Spigot likes to name it's classes is really weird, and for us developers, really <beep> annoying. This error tells us that Spigot is trying to find a class that should be located at net/minecraft/server/v1_8_R1/GenericAttributes but can't, because Spigot 1.8.7 doesn't have a folder named v1_8_R1. Instead, it uses v1_8_R3. See where I'm going with this? Basically, there are two things you can do. One; Ask the developer to update the plugin, or two; if no other plugins actually require that version of spigot - Downgrade. And <beep> hell, don't use 1.8.8. Please. Love from; the Developers.

Example 3: Can't register ...


java.lang.IllegalArgumentException: Can't register java.util.Date with the code name date because that name is already used by date
at ch.njol.skript.registrations.Classes.registerClass(Classes.java:88) ~[?:?]
at uk.co.umbaska.Utils.EnumClassInfo.register(EnumClassInfo.java:56) ~[?:?]
at uk.co.umbaska.Managers.Enums.registerEnum(Enums.java:49) ~[?:?]
at uk.co.umbaska.Managers.Enums.runRegister(Enums.java:64) ~[?:?]
at uk.co.umbaska.Managers.Register.registerAll(Register.java:40) ~[?:?]
at uk.co.umbaska.Main.onEnable(Main.java:91) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:356) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:316) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:418) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:382) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:337) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:256) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:528) [spigot.jar:git-Spigot-44c59bf-8f0f4ed]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_65]



These errors can usually be ignored, especially if they're from Umbaska 1.5.1 or RandomSk's Statistics Enum. Any other ones, you should probably report to the developer, but usually they're nothing major.

Example 4: Skript Severe Error


[20:35:02] [Server thread/ERROR]: #!#! java.lang.NullPointerException
[20:35:02] [Server thread/ERROR]: #!#! at uk.co.umbaska.GattSk.Expressions.ExprClickedItemName.get(ExprClickedItemName.java:46)
[20:35:02] [Server thread/ERROR]: #!#! at uk.co.umbaska.GattSk.Expressions.ExprClickedItemName.get(ExprClickedItemName.java:21)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:162)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:157)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.conditions.CondContains.check(CondContains.java:100)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Condition.run(Condition.java:58)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional.walk(Conditional.java:53)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:150)
[20:35:02] [Server thread/ERROR]: #!#! at ch.njol.skript.SkriptEventHandler$1.execute(SkriptEventHandler.java:110)
[20:35:02] [Server thread/ERROR]: #!#! at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[20:35:02] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
[20:35:02] [Server thread/ERROR]: #!#! at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1603)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:31)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:9)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
[20:35:02] [Server thread/ERROR]: #!#! at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[20:35:02] [Server thread/ERROR]: #!#! at java.util.concurrent.FutureTask.run(Unknown Source)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.SystemUtils.a(SystemUtils.java:19)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:718)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657)
[20:35:02] [Server thread/ERROR]: #!#! at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560)
[20:35:02] [Server thread/ERROR]: #!#! at java.lang.Thread.run(Unknown Source)
[20:35:02] [Server thread/ERROR]: #!#!
[20:35:02] [Server thread/ERROR]: #!#! Version Information:
[20:35:02] [Server thread/ERROR]: #!#! Skript: 2.2-SNAPSHOT
[20:35:02] [Server thread/ERROR]: #!#! Bukkit: 1.8.6-R0.1-SNAPSHOT
[20:35:02] [Server thread/ERROR]: #!#! Minecraft: 1.8.6
[20:35:02] [Server thread/ERROR]: #!#! Java: 1.8.0_45 (Java HotSpot(TM) 64-Bit Server VM 25.45-b02)
[20:35:02] [Server thread/ERROR]: #!#! OS: Linux amd64 2.6.32-504.23.4.el6.x86_64
[20:35:02] [Server thread/ERROR]: #!#!
[20:35:02] [Server thread/ERROR]: #!#! Running CraftBukkit: false
[20:35:02] [Server thread/ERROR]: #!#!
[20:35:02] [Server thread/ERROR]: #!#! Current node: null
[20:35:02] [Server thread/ERROR]: #!#! Current item: clicked item name contains ("close" or "cancel")[class java.lang.Object]
[20:35:02] [Server thread/ERROR]: #!#!
[20:35:02] [Server thread/ERROR]: #!#! Thread: Server thread
[20:35:02] [Server thread/ERROR]: #!#!
[20:35:02] [Server thread/ERROR]: #!#! End of Error.
[20:35:02] [Server thread/ERROR]: #!#!



These sorts of errors should be reported to the developer.

Example 5: InvalidDescriptionExpection



org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:154) ~[spigot.jar:git-Spigot-6d16e64-09ddd9b]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [spigot.jar:git-Spigot-6d16e64-09ddd9b]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:291) [spigot.jar:git-Spigot-6d16e64-09ddd9b]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot.jar:git-Spigot-6d16e64-09ddd9b]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:524) [spigot.jar:git-Spigot-6d16e64-09ddd9b]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 6 more



These should also be reported to the developer. Basically, it means that we screwed up when we were building the plugin, because for some reason the plugin doesn't have it's plugin.yml.

Example 6: NoSuchMethod error



java.lang.NoSuchMethodError: com.massivecraft.factions.Rel.parse(Ljava/lang/String;)Lcom/massivecraft/factions/Rel;
at uk.co.umbaska.Managers.Enums$6.parse(Enums.java:299) ~[?:?]
at uk.co.umbaska.Managers.Enums$6.parse(Enums.java:295) ~[?:?]
at ch.njol.skript.registrations.Classes.parseSimple(Classes.java:400) ~[?:?]
at ch.njol.skript.registrations.Classes.parse(Classes.java:429) ~[?:?]
at ch.njol.skript.lang.UnparsedLiteral.getConvertedExpression(UnparsedLiteral.java:97) ~[?:?]
at ch.njol.skript.lang.UnparsedLiteral.getConvertedExpression(UnparsedLiteral.java:86) ~[?:?]
at ch.njol.skript.lang.UnparsedLiteral.getConvertedExpression(UnparsedLiteral.java:1) ~[?:?]
at ch.njol.skript.conditions.CondCompare.init(CondCompare.java:179) ~[?:?]
at ch.njol.skript.conditions.CondCompare.init(CondCompare.java:131) ~[?:?]
at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:248) ~[?:?]
at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:175) ~[?:?]
at ch.njol.skript.lang.Condition.parse(Condition.java:83) ~[?:?]
at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:729) ~[?:?]
at ch.njol.skript.command.Commands.loadCommand(Commands.java:467) ~[?:?]
at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:469) ~[?:?]
at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:245) ~[?:?]
at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:199) ~[?:?]
at ch.njol.skript.Skript$2.run(Skript.java:407) ~[?:?]
at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-e000104-4cb3258]
at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-e000104-4cb3258]
at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:729) [spigot.jar:git-Spigot-e000104-4cb3258]
at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot.jar:git-Spigot-e000104-4cb3258]
at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot.jar:git-Spigot-e000104-4cb3258]
at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot.jar:git-Spigot-e000104-4cb3258]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]


This is an error that has been brought up so many times in relation to Umbaska and the new Factions and MassiveCore versions. But this applies for everything.

[S]Sometimes[/S] Usually when we developers hook into a plugin, and we call methods; the developer of the plugin that we're hooking into feels like being a bit of a dick and either changes the name of the method, or simply removes it without deprecating it first for a while, or simply making it call the new method.

`java.lang.NoSuchMethodError: com.massivecraft.factions.Rel.parse(Ljava/lang/String;)Lcom/massivecraft/factions/Rel;`

As we can see, the parse method within Factions' Rel class doesn't exist anymore. But clearly, we were able to build the plugin when the method was valid. The way to fix this;

1. Report the error to the developer of the addon.
2. Downgrade back down to a version that worked. If the newer version has newer features, welp. Sucks to be you. Blame the fucking dev of the plugin that's getting hooked into.
3. ???
4. Profit.

More to come

These are the only logs I have on hand with me at the moment, so please post error logs to Pastebin, and link them below and I'll add them to this post if I need/want to.

Thanks ;)