- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在运行作业时出现以下错误。Maven版本:2.7.1
Started by user ******
Running as ******
Building in workspace /******/jenkins-v2/jobs/******/workspace
> /******/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /******/git config remote.develop.url ssh://git@bitbucketdc-ssh.jpmchase.net:7999/etrading/fcs-bloomberg.git # timeout=10
Fetching upstream changes from ssh://git@bitbucketdc-ssh.jpmchase.net:7999/etrading/fcs-bloomberg.git
> /******/git --version # timeout=10
using GIT_ASKPASS to set credentials Git stash access
> /******/git fetch --tags --progress ssh://git@bitbucketdc-ssh.jpmchase.net:7999/etrading/fcs-bloomberg.git +refs/heads/*:refs/remotes/develop/*
> ******/git rev-parse develop/develop^{commit} # timeout=10
Checking out Revision 7ca15cc212d82863db6659e8c4c90fb8d4579f81 (develop/develop)
> /******/git config core.sparsecheckout # timeout=10
> /******/git checkout -f 7ca15cc212d82863db6659e8c4c90fb8d4579f81
Commit message: "******"
> /******/git rev-list --no-walk 7ca15cc212d82863db6659e8c4c90fb8d4579f81 # timeout=10
FATAL: jenkins/scm/RunWithSCM
java.lang.NoClassDefFoundError: jenkins/scm/RunWithSCM
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
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:621)
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.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
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
有时我也得到:
FATAL: org/jenkinsci/plugins/workflow/job/WorkflowRun
java.lang.NoClassDefFoundError: org/jenkinsci/plugins/workflow/job/WorkflowRun
at org.jenkinsci.plugins.workflow.job.WorkflowJob$SCMListenerImpl.onCheckout(WorkflowJob.java:621)
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.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE
我已经看到关于同一问题的那两个线程,但他们没有答案:
java.lang.NoClassDefFoundError: jenkins/scm/RunWithSCM
"NoClassDefFoundError" in jenkins/scm/RunWithSCM
我已经尝试了第一个链接所说的,但没有解决问题:
resolution for the error. 'workflow-aggregator'(Pipeline) plugin was causing the issue. Some of the dependencies were incompatible. Uninstalled and reinstalled the plugin with all its dependencies, which fixed the above issue.
非常感谢您的帮助。
问候
安德烈斯
最佳答案
我认为您遇到了 2 个插件版本的问题。 scm 是 bitbucket,workflow 是描述 CI 步骤的管道。
好像和maven没有关系
检查您的 Jenkins 版本,如果您运行的是 LTS,这是一个好的开始。参见:https://jenkins.io/changelog-stable/
最新最好的是开始的最佳选择。我要寻找的另一件事是这些插件的稳定版本。 https://plugins.jenkins.io/bitbucket好像是 12 月更新,如果最新版本不适合你,请尝试以前的版本
关于 Jenkins NoClassDefFoundError : jenkins/scm/RunWithSCM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48227468/
我在运行作业时出现以下错误。Maven版本:2.7.1 Started by user ****** Running as ****** Building in workspace /******/j
使用 Jenkins 2.8,当我运行一个简单的 Jenkins 作业时,出现以下错误。 Jenkins 作业只是执行 shell 脚本。 FATAL: jenkins/scm/RunWithSCM
我是一名优秀的程序员,十分优秀!