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.

Jenkins JIRA | Vasili Galka | 1 year ago
  1. 0

    [JIRA] [job-dsl-plugin] (JENKINS-30348) Additional classpath locks up JAR files

    Google Groups | 1 year ago | vvv444@gmail.com (JIRA)
    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.
  2. 0

    *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: {noformat} 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 {noformat} 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

    Jenkins JIRA | 1 year ago | Vasili Galka
    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.
  3. 0

    *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: {noformat} 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 {noformat} 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

    Jenkins JIRA | 1 year ago | Vasili Galka
    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.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We run Jenkins on a NAS/NFS share and have repeatedly had issues where builds will fail due to the following error: Started by an SCM change Building in workspace <http://lxe0038:8080/job/Ruff/ws/> Cleaning local Directory . java.nio.file.FileSystemException: <http://lxe0038:8080/job/Ruff/ws/./python/.nfs0000000001b52d730000361a>: Device or resource busy at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1079) at sun.reflect.GeneratedMethodAccessor607.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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:80) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:991) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:972) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:948) at hudson.FilePath.act(FilePath.java:991) at hudson.FilePath.act(FilePath.java:969) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:897) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:833) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1282) 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:1744) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Skipping Cobertura coverage report as build was not UNSTABLE or better ... Recording test results When I go in my jenkins/jobs/Ruff/workspace/python directory, I see the .nfs000xxx file and the contents appear to be the output of the SLOCCount logs (Creating filelist for .., Adding .., Categorizing file. Computing results, etc.) The actual sloccount process that generates the results is finished executing. I cannot seem to delete the .nfs manually as I get the Device or Resource busy. As soon as I kill my jenkins process, the file disappears. I'm running SLOCCount plugin v1.20 and Jenkins 1.618 (latest version of both). This is happening multiple times per day and requires manual intervention. Any ideas or workarounds?

    Jenkins JIRA | 1 year ago | Don Drake
    java.nio.file.FileSystemException: <http://lxe0038:8080/job/Ruff/ws/./python/.nfs0000000001b52d730000361a>: Device or resource busy
  6. 0

    Jenkins Build Failure with Workspace

    Stack Overflow | 8 months ago | Ruben Redman
    java.nio.file.FileSystemException: C:\Program Files (x86)\Jenkins\jobs\iLaundry - Installer Builder\workspace\.\.svn\wc.db: The process cannot access the file because it is being used by another process.

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. Java RT
      Method.invoke
      1. sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
      2. sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      3. sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      4. sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
      5. sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
      6. java.nio.file.Files.delete(Unknown Source)
      7. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      8. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      9. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      10. java.lang.reflect.Method.invoke(Unknown Source)
      10 frames
    3. Hudson
      Util.deleteContentsRecursive
      1. hudson.Util.deleteFile(Util.java:247)
      2. hudson.Util.deleteRecursive(Util.java:310)
      3. hudson.Util.deleteContentsRecursive(Util.java:212)
      4. hudson.Util.deleteRecursive(Util.java:301)
      5. hudson.Util.deleteContentsRecursive(Util.java:212)
      5 frames
    4. Hudson Subversion Plug-in
      WorkspaceUpdater$UpdateTask.delegateTo
      1. hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:81)
      2. hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
      2 frames
    5. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:992)
      2. hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:973)
      3. hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:949)
      4. hudson.FilePath.act(FilePath.java:991)
      5. hudson.FilePath.act(FilePath.java:969)
      6. hudson.scm.SubversionSCM.checkout(SubversionSCM.java:898)
      7. hudson.scm.SubversionSCM.checkout(SubversionSCM.java:834)
      8. hudson.scm.SCM.checkout(SCM.java:485)
      9. hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
      10. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      10 frames
    6. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      1 frame
    7. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      2. hudson.model.Run.execute(Run.java:1741)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      4. hudson.model.ResourceController.execute(ResourceController.java:98)
      5. hudson.model.Executor.run(Executor.java:408)
      5 frames