Additional classpath locks up JAR files

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Configuration: Jenkins 1.625, job-dsl-plugin 1.37, OS Windows 2012R2

      I have a job containing:
      1. Clean SVN checkout
      2. Gradle step that obtains some dependency libraries.
      3. "Process Job DSLs" step that uses these libraries in Groovy script.

      The job was created basing on this example: https://github.com/jenkinsci/job-dsl-plugin/wiki/User-Power-Moves#using-libraries

      Running this job twice, returns an error on second run. The checkout fails since Java still locks the JAR files:

      Cleaning local Directory .
      java.nio.file.FileSystemException: d:\workspace\m\.\lib\antlr-runtime-3.4.jar: The process cannot access the file because it is being used by another process.
      
      	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
      	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      	at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
      	at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
      	at java.nio.file.Files.delete(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at hudson.Util.deleteFile(Util.java:247)
      	at hudson.Util.deleteRecursive(Util.java:310)
      	at hudson.Util.deleteContentsRecursive(Util.java:212)
      	at hudson.Util.deleteRecursive(Util.java:301)
      	at hudson.Util.deleteContentsRecursive(Util.java:212)
      	at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:81)
      	at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
      	at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:992)
      	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:973)
      	at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:949)
      	at hudson.FilePath.act(FilePath.java:991)
      	at hudson.FilePath.act(FilePath.java:969)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:898)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:834)
      	at hudson.scm.SCM.checkout(SCM.java:485)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      	at hudson.model.Run.execute(Run.java:1741)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:408)
      Finished: FAILURE
      

      I found someone already reported similar problem few months ago, but no issue was opened: https://groups.google.com/forum/#!topic/job-dsl-plugin/zwSgrtJhOLc

            Assignee:
            Daniel Spilker
            Reporter:
            Vasili Galka
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: