Refer to the following article
I started Jenkins on Docker and tried echo 'Hello world'
but
The following error will appear:
The plug-in was installed from the UI with Suggested Plugins and
I don't use plugins.txt.
I understand that Java does not have a class, but
I don't know the specific solution.
If you know how to solve this problem, could you tell me?
Reference:
https://dev.classmethod.jp/tool/jenkins/jenkins-on-docker/
Error Description:
Started by user admin
Building in workspace/var/jenkins_home/workspace/test
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.ClassinStratey$AntClassLoader2.defineClassFromData (ClassicPluginStratey.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:653)
at Hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout (AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStratey.checkout(SCMCheckoutStratey.java:86)
at Hudson.model.AbstractBuild$AbstractBuildExecution.run (AbstractBuild.java:529)
at Hudson.model.Run.execute (Run.java:1720)
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
Please tell me the actual Dockerfile you used.
Do you use jenkinsci/jenkins:2.11
for the base image as per the reference article?
You say you don't use plugin.txt, but please show me the specific differences.
This jenkinsci/jenkins
is already Maintenance is finished and
Taking advantage of the new image called jenkins/jenkins
is recommended.
Also, the 2.11 version is old and inconsistent with the plug-in you installed.
I suspect that the above error occurred.
Try the latest stable version of jenkins/jenkins:lts
as your base image.
If using the latest stable image does not solve this problem, click
How exactly did you create your Jenkins project and run echo 'Hello World'
?
If you write it down, you will be able to comment.
903 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
614 Uncaught (inpromise) Error on Electron: An object could not be cloned
580 PHP ssh2_scp_send fails to send files as intended
569 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
605 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.