Error java.lang.NullPointerException

Discussion in 'Spigot Plugin Help' started by RedstoneJr, Apr 18, 2017.

  1. Code (Text):
    [21:53:05 ERROR]: Could not load 'plugins\4ETM-TP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NullPointerException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:301) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.craftbukkit.v1_11_R1.CraftServer.reload(CraftServer.java:748) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.Bukkit.reload(Bukkit.java:540) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchCommand(CraftServer.java:650) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.craftbukkit.v1_11_R1.CraftServer.dispatchServerCommand(CraftServer.java:636) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at net.minecraft.server.v1_11_R1.DedicatedServer.aM(DedicatedServer.java:437) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:400) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
    Caused by: java.lang.NullPointerException
            at main.Teleport.<init>(Teleport.java:49) ~[?:?]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_121]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_121]
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_121]
            at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_121]
            at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_121]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[craftbukkit.jar:git-Spigot-54ec0b8-ac405c3]
            ... 14 more
     
  2. Caused by: java.lang.NullPointerException
    at main.Teleport.<init>(Teleport.java:49) ~[?:?]

    What it is: NullPointerException, which means you are trying to manipulate or use nonexistent/empty (null) data.
    Where it is: line 49 of Teleport.java

    Follow the link in my signature and learn how to read and fix stacktraces, this is probably the commonest and easiest error in java, and you will see it a dozen times a day. You need to fix it yourself.

    If it is not your plugin, light it on fire and get one that works.
     
  3. Just a little comment on your class naming.. You named one of your classes "Teleport"? That's not a thing, it's a verb! That makes it a method.
     
    • Optimistic Optimistic x 1

  4. No sanity please.
    springframework.web.servlet.mvc.RequestMappingInfoHandlerMethodMappingNamingStrategy
     
  5. I'm sorry if I offended you lol. That's just how I type... :p