-
-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoClassDefFoundError: org/eclipse/jgit/internal/JGitText #756
Comments
I was able to work around this issue by switching from tag
Are the git jars not supposed to be on the agent by default? |
The JGit jar files that you installed are not used by Jenkins (as far as I know). Jenkins downloads files from the controller to the agent when it needs them. A report of a missing internal JGit class likely means there is some other issue. |
@MarkEWaite That is good to know. I'll dive through logs of the controller and see if anything pops out. If I can't find anything do you have any recommendations on how to ascertain additional details about what is going on (i.e. increased log verbosity, etc.)? Is the same true for binary dependencies, such as the Docker Pipeline plugin needing the docker binary installed on the agent? |
@jesseadams as there seem to be nothing "obvious and easy" to catch, I suggest narrowing the scope. Usually, trying to reproduce with a
Usually, checking the controller logs is a really good start. Filtering on the time when the error happens helps a lot.
Not at all: the Docker Pipeline plugin uses a java Docker client (instead of expecting the |
This isn't our experience. With this Jenkinsfile:
I get this error:
Using this plugin @ 572.v950f58993843: https://plugins.jenkins.io/docker-workflow/ |
When I try to do a git clone using an ECS build agent without installing the jgit library on it then it fails. Logs from the controller (LTS 2.426.3)
Logs from build agent (docker image: jenkins/inbound-agent:latest-alpine-jdk21)
|
I'm unable to duplicate the failure with my configuration. I use an Alpine Linux agent with I created a freestyle project that clones the git client plugin repository over https. First attempt with command line git worked as expected. Second attempt with JGit worked as expected. Is there a major difference between agents that run on ECS and agents that are started from a Linux command line on a machine that has docker installed? Do you see the same problem if you run an agent from a Linux command line? When I run the Alpine agent container, the Eclipse JGit jar file is downloaded into the remoting Jar cache directory of that container as |
Command line git is a binary dependency that needs to be installed on the agent. Likewise for git-lfs, Apache Maven, and many other tools that are used |
It happens to me, and looks like it was a non existing credential defined on a Jenkinsfile pipeline |
Can you provide more details so that others can duplicate the issue that you're seeing? When I run the following Pipeline, it fails as expected with a message that the credential cannot be found. No mention of JGitText in the message: pipeline {
agent any
stages {
stage('Invalid credential') {
steps {
checkout scmGit(branches: [[name: 'master']],
userRemoteConfigs: [[credentialsId: 'does-not-exist',
url: 'https://github.com/MarkEWaite/tasks.git']])
}
}
}
} |
I am using jenkins 2.445 with kubernetes plugin , I am working on migrate from a old jenkins installation to this new brand jenkins, I have following list of plugins installed antisamy-markup-formatter: 162.v0e6ec0fcfcf6 since I am working on migration of an exisitng Jenkinsfile, I notice the JNLP container on my pod was failing with mentioned error, after some research I notice some of my credentials were not configured yet, I just create missing credentials and after that the errors went away. My env block looks like this:
|
This is reported as resolved in JGit 6.10.0 and later. Refer to: |
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Amazon Linux - 5.10.205-195.807.amzn2.x86_64
Reproduction steps
Expected Results
The job runs successfully or otherwise errors out with a command issue.
Actual Results
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText
Anything else?
It works fine with a freestyle job with no usage of git.
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: