Subversion SVNKit working with Jenkins

+2 votes

I have the following problem, working with Jenkins. I try to build the project and receive following mistake:

Started by user Jenkins Admin
Building in workspace /var/lib/jenkins/jenkins/jobs/kobv-albert-commons/workspace
Checking out a fresh workspace because Jenkins failed to detect the current workspace /var/lib/jenkins/jenkins/jobs/kobv-albert-commons/workspace
ERROR: svn: The path '/var/lib/jenkins/jenkins/jobs/kobv-albert-commons' appears to be part of Subversion 1.7 (SVNKit 1.4) or greater
working copy rooted at '/var/lib/jenkins/jenkins'.
Please upgrade your Subversion (SVNKit) client to use this working copy.
org.tmatesoft.svn.core.SVNException: svn: The path '/var/lib/jenkins/jenkins/jobs/kobv-albert-commons' appears to be part of Subversion 1.7 (SVNKit 1.4) or greater
working copy rooted at '/var/lib/jenkins/jenkins'.
Please upgrade your Subversion (SVNKit) client to use this working copy.
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
    at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.checkWCNG(SVNAdminAreaFactory.java:143)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.checkWCNG(SVNAdminAreaFactory.java:145)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.checkWCNG(SVNAdminAreaFactory.java:145)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.open(SVNAdminAreaFactory.java:190)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.doOpen(SVNWCAccess.java:379)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:283)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.probeOpen(SVNWCAccess.java:310)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.probeOpen(SVNWCAccess.java:295)
    at org.tmatesoft.svn.core.wc.SVNWCClient.crawlEntries(SVNWCClient.java:3304)
    at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2506)
    at org.tmatesoft.svn.core.wc.SVNWCClient.doInfo(SVNWCClient.java:2873)
    at hudson.scm.subversion.UpdateUpdater$TaskImpl.parseSvnInfo(UpdateUpdater.java:115)
    at hudson.scm.subversion.UpdateUpdater$TaskImpl.isUpdatable(UpdateUpdater.java:87)
    at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:120)
    at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:136)
    at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:788)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:769)
    at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:753)
    at hudson.FilePath.act(FilePath.java:904)
    at hudson.FilePath.act(FilePath.java:877)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:743)
    at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:685)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1367)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:674)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:579)
    at hudson.model.Run.execute(Run.java:1575)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:237)
Caused by: org.tmatesoft.svn.core.SVNErrorMessage: svn: The path '/var/lib/jenkins/jenkins/jobs/kobv-albert-commons' appears to be part of Subversion 1.7 (SVNKit 1.4) or greater
working copy rooted at '/var/lib/jenkins/jenkins'.
Please upgrade your Subversion (SVNKit) client to use this working copy.
    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:200)
    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:181)
    at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:133)
    at org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.checkWCNG(SVNAdminAreaFactory.java:138)
    ... 29 more

I use Jenkins Subversion Plugin 1.5

Aug 8, 2018 in Jenkins by Hannah
• 18,540 points
3,003 views

1 answer to this question.

0 votes

Jenkins doesn't use the installed Subversion command line client and doesn't even need it. Instead, it uses SVNKit to checkout and working directory. Your error is that it tried to do an update, but sees the wrong version

Follow these steps:

-go to manage Jenkins

-go to configure system

-you’ll find a subversion section and it allows you to adjust your working copy format

There was a big change in the Subversion working copy format from version 1.6 to 1.7. Apparently, something you did created a Subversion 1.6 version of the working copy. Change the SVNKit plugin to version 1.6, and clean the workspace.

answered Aug 8, 2018 by Kalgi
• 52,360 points

I am using Jenkins declarative pipelines (more information on https://jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline). You can cleanup your workspace in a declarative pipeline step as follows:

pipeline {
    stages {
        stage('Cleanup workspace') {
            steps {
                deleteDir()
            }
        }    
    }
}

Or you can use it as a post action (more information on https://jenkins.io/doc/book/pipeline/syntax/#post):

pipeline {
    stages {
        stage('Build Java application') {
            steps {
                sh "mvn clean install"
            }
        }    
    }
    post {
        always {
            deleteDir()
        }
    }
}

The disadvantage of cleaning the workspace is that it is not possible to check whether there are any changes in a next build. This means that every time you check out again, this results in unnecessary CPU load and network traffic. My advice is to only remove your workspace in case of conflicts. For example, you can no longer use functions like pollSCM (more information on https://jenkins.io/doc/book/pipeline/syntax/#triggers) for which it is intended, because you work with a new workspace every time and you can not make comparisons with a previous workspace.

Thanks a lot @Bekir, thats the easiest method for cleaning workspace.
Hey @Bekir, thanks for the contribution. Could you please write an answer which includes these steps as well for better understanding of the readers. Will choose that as the best answer.
Hello Kalgi, I updated my post. Regards, Bekir
Thank you so much @Bekir, appreciate your effort :)
Thanks a lot @Bekir, What I dont understand is, after cleaning my workspace if I want to analyze the changes made in the next build, how would I do that?

Related Questions In Jenkins

0 votes
1 answer

any way to integrate Jenkins with ServiceNow?

Now, there is no official servicenow support ...READ MORE

answered Apr 10, 2018 in Jenkins by DareDev
• 6,890 points
4,806 views
0 votes
1 answer

Error while communicating with remote Oracle DB through Jenkins-CI

I was also facing the same problem. ...READ MORE

answered Apr 25, 2018 in Jenkins by shubham
• 7,340 points
976 views
0 votes
1 answer

gulp serve & not working in jenkins

Try using nohup. It will creates nohup.out ...READ MORE

answered May 11, 2018 in Jenkins by DareDev
• 6,890 points
1,261 views
0 votes
1 answer

Unable to integrate jenkins with tfs: EndpointNotFoundException

Check if you can connect to tfs ...READ MORE

answered May 28, 2018 in Jenkins by DareDev
• 6,890 points

edited May 28, 2018 by DareDev 1,143 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,954 views
+2 votes
1 answer
0 votes
2 answers

Subversion (SVNKIT) not working in Jenkins

Jenkins doesn't use the installed Subversion command ...READ MORE

answered Aug 8, 2018 in Jenkins by Kalgi
• 52,360 points
2,369 views
0 votes
1 answer

Jenkins - simply robocopy in Jenkins finishes marks build with failure

robocopy returns a bit map This is the ...READ MORE

answered Aug 6, 2018 in Jenkins by Kalgi
• 52,360 points
3,519 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP