What does this mean?

Discussion in 'Plugin Development' started by TechGuard, Mar 19, 2011.

Thread Status:
Not open for further replies.
  1. Code:
    [SEVERE] Could not load plugins\CraftPack.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:109)
        ... 8 more
    Caused by: java.lang.NullPointerException
        at com.bukkit.techguard.craftpack.CraftPack.getName(CraftPack.java:78)
        at com.bukkit.techguard.craftpack.CraftPack.sM(CraftPack.java:85)
        at com.bukkit.techguard.craftpack.persistance.SQLite.<init>(SQLite.java:23)
        at com.bukkit.techguard.craftpack.CraftPack.<init>(CraftPack.java:25)
        ... 13 more
    What does that error mean?
     
  2. Offline

    Edward Hand

    Invalid plugin exception usually means one of three things:
    • You haven't got a valid plugin.yml
    • you used a *.bukkit namespace
    • you used the 'stupidly long contructor' in your plugin class
    I know you're not the usual newb developer but have you done any of these things?
     
  3. Code:
    public CraftPack(){
    }
    That isn't very long..

    I don't use any *.bukkit namespaces

    And this doesn't look wrong to me.
    Code:
    name: CraftPack
    main: com.bukkit.techguard.craftpack.CraftPack
    version: 0.1
    description: CraftZone Packet
    authors:
      - TechGuardd
     
  4. Offline

    Joshua Neicho

    your main in the plugin.yml shouldnt have com.bukkit if you dont use one say if your package is techguard.craftpack and your main file is Craftpack then the main in your plugin.yml is techguard.craftpack.Craftpack
     
  5. eh? My package is: com.bukkit.techguard.craftpack
     
  6. Offline

    Joshua Neicho

    well Edward Hand said you cant use com.bukkit anymore use com.teckguard.craftpack and in the plugin.yml use com.teckguard.craftpackCraftpack
     
  7. Well, that is not the problem :(
     
  8. Offline

    bekvon

    You CANNOT use anything that starts with com.bukkit. At all. If your using com.bukkit it will throw a exception. You can do what I did and switch bukkit with your name so that you have: com.techguard.bukkit.Craftpack and that will work.
     
  9. Changed it, but still not working.
     
  10. Offline

    nickguletskii

    Try to follow the logic - can something be null while you are initialising (constucting) the main class?
     
  11. Offline

    Purre

    When I look at the stack trace you gave, it seems like your CraftPack.getName method throws a nullpointerexception at line 78. The reason you get the InvalidPluginException is that it will trigger if there is something wrong with the initiation of the plugin.
     
  12. Offline

    bekvon

    This.

    Perhaps your getName() is returning a null String, and then you are trying to do some operation on that string which is throwing the exception since its null. Add a simple check for whatever uses that function.

    Code:
    String string = CraftPack.getName();
    if(string!=null)
    {
        //do string stuff here
    }
     
  13. getName, is actually getting the of the plugin.yml. Thanks for the help, eventually I will find a solution.
     
  14. Offline

    speeddemon92

    Hey tech if your still having problems post line 78 of your CraftPack.java.
     
Thread Status:
Not open for further replies.

Share This Page