为什么我的Jenkins在重新启动后抛出“没有找到这样的方法”异常?

时间:2018-05-07 18:34:22

标签: java jenkins jenkins-pipeline

詹金斯重新开始了。我丢失了所有使用'jenkins管道'的项目。我看到服务器本身的目录,但从它的外观来看,Jenkins无法加载它们;我没有在UI上看到这些项目。

以下是我看到的重复错误。可能是什么原因?我在Jenkins 2.7.4上。

May 07, 2018 2:32:00 PM com.cloudbees.hudson.plugins.folder.computed.FolderCron doRun
WARNING: Cron thread throw an exception
java.lang.NoSuchMethodError: jenkins.model.Jenkins.allItems(Ljava/lang/Class;)Ljava/lang/Iterable;
    at com.cloudbees.hudson.plugins.folder.computed.FolderCron.checkTriggers(FolderCron.java:117)
    at com.cloudbees.hudson.plugins.folder.computed.FolderCron.doRun(FolderCron.java:101)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    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)

java.lang.NoSuchMethodError: jenkins.model.Jenkins.allItems(Ljava/lang/Class;)Ljava/lang/Iterable;
    at com.cloudbees.hudson.plugins.folder.computed.FolderCron.checkTriggers(FolderCron.java:117)
    at com.cloudbees.hudson.plugins.folder.computed.FolderCron.doRun(FolderCron.java:101)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    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)

1 个答案:

答案 0 :(得分:2)

目前唯一的线索是JENKINS 48649

  

升级其中一个插件后面临同样的错误。

因此,如果您最近升级了一些插件,请尝试:

  • 清空%lsmagic 文件夹
  • 重新启动并重新安装JENKINS Pipeline Plugin
  • 查看问题是否仍然存在
  • 以增量方式添加其他插件

OP iCodeLikeImDrunk实际mentions

  

我们只是升级到最新版,似乎解决了一切。