Some weird error

Discussion in 'Plugin Development' started by Lolmewn, Apr 30, 2012.

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

    Lolmewn Retired Staff

    Eh, I started getting this error randomly. Not sure how to fix it.. Maybe you do?
    1. 15:58:56 [SEVERE] Error occurred while enabling Skillz vjenkins-Skillz-203 (Is i
    2. t up to date?)
    3. java.lang.NoClassDefFoundError: nl/lolmen/Skillz/Skillz$4
    4. at nl.lolmen.Skillz.Skillz.startUserSavingThread(
    5. at nl.lolmen.Skillz.Skillz.onEnable(
    6. at
    7. at
    8. .java:336)
    9. at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    11. at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    12. at org.bukkit.craftbukkit.CraftServer.enablePlugins(
    13. )
    14. at net.minecraft.server.MinecraftServer.t(
    15. at net.minecraft.server.MinecraftServer.a(
    16. at net.minecraft.server.MinecraftServer.init(
    17. at
    18. at
    19. Caused by: java.lang.ClassNotFoundException: nl.lolmen.Skillz.Skillz$4
    20. at$ Source)
    21. at$ Source)
    22. at Method)
    23. at Source)
    24. at
    25. java:41)
    26. at
    27. java:29)
    28. at java.lang.ClassLoader.loadClass(Unknown Source)
    29. at java.lang.ClassLoader.loadClass(Unknown Source)
    30. ... 12 more

    And my code:
    1. @Override
    2. public void onEnable() {
    3. double time = System.nanoTime();
    4. this.makeSettings();
    5. this.loadUserManager();
    6. this.startUserSavingThread();
    7. ...

    1. private void startUserSavingThread() {
    2. this.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new Runnable(){
    3. @Override
    4. public void run() {
    5. getLogger().info("Saving Skillz Users..");
    6. getUserManager().save(true);
    7. }
    8. }, 24000L, 24000L);
    9. }

    The really weird thing is that line 526 from the error isn't in the startUserSavingThread() Method. I'm guessing something got messed up.
    I'm using Maven + Jenkins, and I'm pretty noobie with it. Maybe I configured something wrong in it?
  2. Offline


    NoClassDefinitionFound || ClassNotFoundException

    Try surround the trouble areas with a try catch statement and it will tell you exactly where the error is occurring.
  3. Offline

    Lolmewn Retired Staff

    I don't see why this would work. I already have a stacktrace, no need to generate another one, right?
  4. Offline


    not exactly, unless your hiding the throwable somewhere i would try what i said above then look at it.
  5. Offline

    Lolmewn Retired Staff

    Well, seems I 'partially' fixed it. Instead of building it with Jenkins, I built it with Netbeans. It seems Jenkins just uses the wrong data to build my project (eh, don't know how to fix that :O)
  6. Offline


    well, glad you partially got it fixed. when errors pop up like that it tells you generally where it is. when you have the try catch it tells you exactly where the error occurs.
  7. Offline


    the no classfound error has been normal for me lately. To fix it i have been leftclicking once on my project and F5 to refresh. Some times ill "Clean" the project and that usually fixes the problems.
  8. Offline

    Lolmewn Retired Staff

    Yea that also seemed to work a bit. (Clean)
Thread Status:
Not open for further replies.

Share This Page