2017-09-22 83 views
1

使用Jenkins 2.8時,我運行簡單的Jenkins作業時出現以下錯誤。詹金斯的工作只是執行一個shell腳本。jenkins/scm/RunWithSCM中的「NoClassDefFoundError」

FATAL: jenkins/scm/RunWithSCM 
java.lang.NoClassDefFoundError: jenkins/scm/RunWithSCM 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763) 
    at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1139) 
    at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:878) 
    at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310) 
    at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1366) 
    at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326) 
    at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
    at org.jenkinsci.plugins.workflow.job.WorkflowJob$SCMListenerImpl.onCheckout(WorkflowJob.java:629) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) 
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) 
    at hudson.model.Run.execute(Run.java:1741) 
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 
    at hudson.model.ResourceController.execute(ResourceController.java:98) 
    at hudson.model.Executor.run(Executor.java:410) 
Caused by: java.lang.ClassNotFoundException: jenkins.scm.RunWithSCM 
    at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376) 
    at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326) 
    at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
    ... 17 more 
Finished: FAILURE 

我該如何解決這個問題?

回答

2

得到錯誤的分辨率。 'workflow-aggregator'(Pipeline)插件導致了這個問題。一些依賴關係是不兼容的。卸載並重新安裝插件及其所有依賴項,這解決了上述問題。