解决jenkins构建job报错“NoClassDefFoundError” in jenkins/scm/RunWithSCM问题

前端之家收集整理的这篇文章主要介绍了解决jenkins构建job报错“NoClassDefFoundError” in jenkins/scm/RunWithSCM问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

现象

使用Jenkins 2.8,当我运行一个简单的Jenkins工作时,构建一个job获取代码,出现下面的错误

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

原因:

由于Jenkins下载插件不全导致,插件下载不全由于网络原因所致(公司可能屏蔽了Jenkins原来的镜像地址,导致下载不全)

解决方案:

可供选择的jenkins2 插件镜像列表:

Jenkins 所有镜像列表: http://mirrors.jenkins-ci.org/status.html
比如日本的镜像: http://mirror.esuni.jp/jenkins/,http://ftp.yz.yamagata-u.ac.jp/pub/misc/jenkins/, http://ftp.tsukuba.wide.ad.jp/software/jenkins/
德国的镜像:http://jenkins.mirror.isppower.de/ , http://mirror.yandex.ru/mirrors/jenkins/
官方的镜像:http://mirrors.jenkins-ci.org/, http://archives.jenkins-ci.org/
清华大学镜像:https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json

更换地址方法

1.进入jenkins系统管理 
2.进入插件管理

 

3.点击高级,修改升级站点的地址

 

原文链接:/jenkins/992137.html

猜你在找的Jenkins相关文章