Exception in thread "Craft Scheduler Thread

Discussion in 'Spigot Plugin Help' started by Chevels, May 14, 2016.

  1. Hello :)

    Since my server is 1.9 (same on 1.9.2), I've an issue with 3 plugins. LWC, PermissionBukkit and AntiPub spam console with this error:
    [05:28:37 WARN]: Exception in thread "Craft Scheduler Thread - 56"
    [05:28:37 WARN]: org.apache.commons.lang.UnhandledException: Plugin LWC v1.7.2 generated an exception while executing task 7
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player;
    at org.mcstats.Metrics.postPlugin(Metrics.java:357)
    at org.mcstats.Metrics.access$400(Metrics.java:64)
    at org.mcstats.Metrics$1.run(Metrics.java:245)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftTask.run(CraftTask.java:71)
    at org.bukkit.craftbukkit.v1_9_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    ... 3 more
    This issue happen every 10mn. Plugins are up to date (last version).
    Plugins seem to work fine but they spam the console and I would like fix the problem if possible. Do you have any suggestions about the cause?

    I contacted the 3 developers 2 weeks ago but none answered me ... I guess my question is embarrassing or they do not know answer :/ That's why I come to ask here.

    Have a nice week end!
  2. Does anyone have an idea?
  3. Are the plugins 1.9?
  4. Yes. What's weird is that on my test server that has the same configuration as my server, these plugins do not display this error ... I do not understand why they behave differently on the two servers.
    Is it lack a library? Why this error occurs exactly every 10 minutes?
    What does the following line?
    Caused by: java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player;
    at org.mcstats.Metrics.postPlugin(Metrics.java:357)

    I feel that this is related Metrics but I do not know enough to understand this message.

    Thanks for your help
  5. Im a beginner with developing but i see org.bukkit.Server.getOnlinePlayers is not 1.9 as i know
  6. Really? So there is a mystery because my server is in 1.9 and these plugins are 1.9 compatible... Another weird thing.
    I hope someone could help me solve it :/
  7. One of your plugins is outdated and uses legacy metrics code, the stacktrace doesn't show us which plugin causes it, though.
    It's clear that that plugin uses metrics so you can just remove plugins which use metrics one by one and find the cause.
  8. Thank you for that clarification! Is the offending plugin necessarily one of three plugins which I speak? Or might it be another plugin that disrupts those there?

    That said, it's strange that on my test server (which is a clone of my server) this error does not appear... The only difference between these two servers is the hosting machine.
  9. Hi,
    any solution? i have the same problem. Two Server with the same Spigot 1.9 (actually) build and the same plugin version. One oft the server has the same issue like above. The another server don't spam the exception every 10 minutes. I have the exceptions since 2 weeks.

    Console : [09:44:36 WARN]: Exception in thread "Craft Scheduler Thread - 27"
    Console : [09:44:36 WARN]: org.apache.commons.lang.UnhandledException: Plugin PlugMan v2.1.1 generated an exception while executing task 1446
    Console : at org.bukkit.craftbukkit.v1_9_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
    Console : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    Console : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    Console : at java.lang.Thread.run(Thread.java:745)
    Console : Caused by: java.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player;
    Console : at org.mcstats.Metrics.postPlugin(Metrics.java:357)
    Console : at org.mcstats.Metrics.access$4(Metrics.java:350)
    Console : at org.mcstats.Metrics$1.run(Metrics.java:245)
    Console : at org.bukkit.craftbukkit.v1_9_R2.scheduler.CraftTask.run(CraftTask.java:71)
    Console : at org.bukkit.craftbukkit.v1_9_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    Console : ... 3 more