Jenkins 2.7.2 Pipeline job is not working for 'Flat property' in downloading schema.
While downloading artifacts from generic Artifactory repository (rb-artifactory), Jenkins pipeline job is throwing this error:
java.lang.NoClassDefFoundError: org/eclipse/jgit/util/StringUtils
I request for your support to resolve this error.
We have the following download schema:
def ar_download_logs = """{
"files": [
{
"pattern": "${ar_url}/out/*",
"flat": "1",
"target": "logs/"
}
]
}"""
def buildInfo1 = ar_server.download(ar_download_logs)
"flat": "1"
causes the problem while converting from String to Boolean, which uses StringUtil and causing an exception java.lang.NoClassDefFoundError
.
How to establish dependencies between some of StringUtils package for Artifactory Plugin: 2.5.1 to use string to Boolean conversion?
If you take a look at the following source code where the exception occurs, then it's a Line 79 of GenericDownloadExecutor.java as given by the stack trace.
boolean isFlat = file.getFlat() != null && StringUtils.toBoolean(file.getFlat());
I also would like to share a plugin that are used for the project:
Installing git plugin solves the issue.
In order for this to take affect Jenkins must be restarted after the installation.
A fix for this issue is included as part of the Artifactory Plugin 2.8.0 : https://www.jfrog.com/jira/browse/HAP-829
According with other responses, you have 2 options:
In these 2 options you need to update or install plugins so you need to restart your Jenkins installation.Restart Jenkins usually takes some minutes.
I recommend you to update your Artifactory plugin for solve this issue and posible future issues.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.