Solved StackOverflow error

Discussion in 'Plugin Development' started by kreashenz, Jun 3, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    kreashenz

    Hey. I am getting a stupid stack overflow error, and I don't know how to fix it.. This is starting to get me annoyed, because I added a few new things to this plugin, and I can't test them.. Any help would be appreciated.
    Stacktrace (open)

    [SEVERE] Could not load 'plugins\CoD.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.StackOverflowError
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:182)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.java:239)
    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:217)
    at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55)
    at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11)
    at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:106)
    at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382)
    at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
    Caused by: java.lang.StackOverflowError
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:105)
    at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:175)
    at me.kreashenz.cod.clan.Clan.<init>(Clan.java:14)
    at me.kreashenz.cod.CoD.<init>(CoD.java:69)
    at me.kreashenz.cod.commands.CommandLeave.<init>(CommandLeave.java:14)
    at me.kreashenz.cod.commands.CommandCod.<init>(CommandCod.java:19)
    at me.kreashenz.cod.CoD.<init>(CoD.java:71)
    And repeats the last 3 lines.


    My lines
    Code:java
    1. // Clan line 14
    2. private YamlConfiguration a = YamlConfiguration.loadConfiguration(new File("plugins/CoD/clans.yml"));
    3.  
    4. // CoD line 69 (hehehe)
    5. public Clan clan = new Clan();
    6.  
    7. // CommandLeave line 14 ( Constructor )
    8. public CommandLeave(CommandCod main){
    9. this.main = main;
    10. }
    11.  
    12. // CommandCod line 19
    13. private CommandLeave leave = new CommandLeave(this);
    14.  
    15. // And finally
    16. // CoD line 71
    17. public CommandCod cmd = new CommandCod(this);


    I think it's something to do with something not loading properly.. I'm not sure, but please help me :)

    Thanks!
     
  2. Offline

    vemacs

    Mind pasting clans.yml?
     
  3. Offline

    kreashenz

    Solved. As soon as my mum unplugged the router, I found out.. I was extending the main class for something I was doing a few days back..
    [EDIT] I just realised, I just bumped the post.. Sorry.
     
Thread Status:
Not open for further replies.

Share This Page