java.nio.file.DirectoryNotEmptyException: /home/rseddon/nexus/sonatype-work/nexus/storage/thirdparty

Sonatype JIRA | Rich Seddon | 2 years ago
  1. 0

    Configure a work directory in Nexus where the sonatype-work/nexus/trash and sonatype-work/nexus/storage directories are on different filesystems. Delete a repository in Nexus. This will fail because the files.move() call throws java.nio.file.DirectoryNotEmptyException. {quote} 2015-01-15 08:56:35,680-0600 WARN [pxpool-1-thread-1] admin org.sonatype.nexus.proxy.wastebasket.DefaultRepositoryFolderRemover - Got exception during execution of RepositoryFolderCleaner org.sonatype.nexus.proxy.wastebasket.CoreRepositoryFolderCleaner, continuing. java.nio.file.DirectoryNotEmptyException: /home/rseddon/nexus/sonatype-work/nexus/storage/thirdparty at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:495) ~[na:1.7.0_71] at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) ~[na:1.7.0_71] at java.nio.file.Files.move(Files.java:1347) ~[na:1.7.0_71] at org.sonatype.nexus.util.file.DirSupport.move(DirSupport.java:406) ~[nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.util.file.DirSupport.moveIfExists(DirSupport.java:418) ~[nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.wastebasket.AbstractRepositoryFolderCleaner.delete(AbstractRepositoryFolderCleaner.java:54) ~[nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.wastebasket.CoreRepositoryFolderCleaner.cleanRepositoryFolders(CoreRepositoryFolderCleaner.java:45) ~[nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.wastebasket.DefaultRepositoryFolderRemover.deleteRepositoryFolders(DefaultRepositoryFolderRemover.java:45) ~[nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.tasks.DeleteRepositoryFoldersTask.doRun(DeleteRepositoryFoldersTask.java:73) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) [nexus-scheduler-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_71] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_71] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_71] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_71] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_71] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71] {quote}

    Sonatype JIRA | 2 years ago | Rich Seddon
    java.nio.file.DirectoryNotEmptyException: /home/rseddon/nexus/sonatype-work/nexus/storage/thirdparty
  2. 0

    1. Create an npm proxy repository named npm. 2. Request some metadata and package that results in 200 and stored in local cache 3. Delete the repository. Now you have nexus/trash/npm and the packages you downloaded 4. Create an npm hosted repository named npm 5. publish an npm package to it. 6. Delete the repository. This fails ( see example stack trace below ) and the storage/npm directory and contents remain in place. The repository is removed from nexus.xml 7. create an npm proxy repo named npm again. the repo gets created fine. 8. Now the new proxy repo contains the packages from the failed deleted hosted repo directory Expected: - delete to trash should not fail in this way and formerly deleted contents should not be available to newly created repos. {noformat} jvm 1 | 2015-05-08 14:45:33,867-0300 INFO [qtp565526063-81] admin org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Removed repository "npm-proxy" [id=npm-proxy][contentClass=npm][mainFacet=com.bolyuba.nexus.plugin.npm.proxy.NpmProxyRepository] jvm 1 | 2015-05-08 14:45:33,867-0300 INFO [qtp565526063-81] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Repository Grouping Configuration, npm] made by admin... jvm 1 | 2015-05-08 14:45:34,369-0300 INFO [pxpool-1-thread-4] admin org.sonatype.nexus.tasks.DeleteRepositoryFoldersTask - Scheduled task (DeleteRepositoryFoldersTask) started :: Deleting folders with repository ID: npm-proxy jvm 1 | 2015-05-08 14:45:34,375-0300 WARN [pxpool-1-thread-4] admin org.sonatype.nexus.proxy.wastebasket.DefaultRepositoryFolderRemover - Got exception during execution of RepositoryFolderCleaner org.sonatype.nexus.proxy.wastebasket.CoreRepositoryFolderCleaner, continuing. jvm 1 | java.nio.file.DirectoryNotEmptyException: /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/assemblies/nexus-pro/target/nexus-professional-2.11.2-06-bundle/sonatype-work/nexus/trash/npm-proxy jvm 1 | at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:445) ~[na:1.8.0_40] jvm 1 | at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) ~[na:1.8.0_40] jvm 1 | at java.nio.file.Files.move(Files.java:1395) ~[na:1.8.0_40] jvm 1 | at org.sonatype.nexus.util.file.DirSupport.sameFileStoreMove(DirSupport.java:405) ~[nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.util.file.DirSupport.move(DirSupport.java:450) ~[nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.util.file.DirSupport.moveIfExists(DirSupport.java:465) ~[nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.proxy.wastebasket.AbstractRepositoryFolderCleaner.delete(AbstractRepositoryFolderCleaner.java:54) ~[nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.proxy.wastebasket.CoreRepositoryFolderCleaner.cleanRepositoryFolders(CoreRepositoryFolderCleaner.java:45) ~[nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.proxy.wastebasket.DefaultRepositoryFolderRemover.deleteRepositoryFolders(DefaultRepositoryFolderRemover.java:45) ~[nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.tasks.DeleteRepositoryFoldersTask.doRun(DeleteRepositoryFoldersTask.java:73) [nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) [nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) [nexus-scheduler-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.2-06.jar:2.11.2-06] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_40] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_40] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_40] jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40] jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40] jvm 1 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40] jvm 1 | 2015-05-08 14:45:34,375-0300 INFO [pxpool-1-thread-4] admin org.sonatype.nexus.tasks.DeleteRepositoryFoldersTask - Scheduled task (DeleteRepositoryFoldersTask) finished :: Deleting folders with repository ID: npm-proxy (started 2015-05-08T14:45:34-03:00, runtime 0:00:00.006) jvm 1 | 2015-05-08 14:45:34,379-0300 INFO [pxpool-1-thread-4] admin org.sonatype.nexus.configuration.application.DefaultNexusConfiguration - Applying Nexus Configuration due to changes in [Scheduled Tasks] made by *TASK... {noformat}

    Sonatype JIRA | 2 years ago | Peter Lynch
    java.nio.file.DirectoryNotEmptyException: /Users/plynch/dev/sonatype/nexus-all/nexus-bundles/assemblies/nexus-pro/target/nexus-professional-2.11.2-06-bundle/sonatype-work/nexus/trash/npm-proxy
  3. 0

    java.nio.Files.move() - DirectoryNotEmptyException on OS X

    Stack Overflow | 4 years ago | Daryl Teo
    java.nio.file.DirectoryNotEmptyException: /var/folders/j_/1v53z7q15v51wyb00jzht_ch0000gn/T/vertx-68e24a9e-ee15-4b49-a796-7176714865ec
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IDE 1.6.5 is now available for download - Page 10

    arduino.cc | 8 months ago
    java.nio.file.DirectoryNotEmptyException: C:\Users\dt14test2\AppData\Local\Ardui no15
  6. 0

    Using a XFS filesystem makes FileStorageService.deleteResource behave differently from Ext4

    GitHub | 3 months ago | hsilva-keep
    org.roda.core.data.exceptions.AlreadyExistsException: Cannot copy because target path already exists: /apps/KEEPS/roda/data/trash/e0ff1a9f-3e20-4e3f-a5c6-33da32aec71e/storage/aip/8faeaf8c-9a1f-49cc-a239-f34 10d8bc13b

    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.DirectoryNotEmptyException

      /home/rseddon/nexus/sonatype-work/nexus/storage/thirdparty

      at sun.nio.fs.UnixCopyFile.move()
    2. Java RT
      Files.move
      1. sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:495)[na:1.7.0_71]
      2. sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)[na:1.7.0_71]
      3. java.nio.file.Files.move(Files.java:1347)[na:1.7.0_71]
      3 frames
    3. ${project.groupId}:${project.artifactId}
      AbstractNexusTask.call
      1. org.sonatype.nexus.util.file.DirSupport.move(DirSupport.java:406)[nexus-core-2.11.1-01.jar:2.11.1-01]
      2. org.sonatype.nexus.util.file.DirSupport.moveIfExists(DirSupport.java:418)[nexus-core-2.11.1-01.jar:2.11.1-01]
      3. org.sonatype.nexus.proxy.wastebasket.AbstractRepositoryFolderCleaner.delete(AbstractRepositoryFolderCleaner.java:54)[nexus-core-2.11.1-01.jar:2.11.1-01]
      4. org.sonatype.nexus.proxy.wastebasket.CoreRepositoryFolderCleaner.cleanRepositoryFolders(CoreRepositoryFolderCleaner.java:45)[nexus-core-2.11.1-01.jar:2.11.1-01]
      5. org.sonatype.nexus.proxy.wastebasket.DefaultRepositoryFolderRemover.deleteRepositoryFolders(DefaultRepositoryFolderRemover.java:45)[nexus-core-2.11.1-01.jar:2.11.1-01]
      6. org.sonatype.nexus.tasks.DeleteRepositoryFoldersTask.doRun(DeleteRepositoryFoldersTask.java:73)[nexus-core-2.11.1-01.jar:2.11.1-01]
      7. org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151)[nexus-core-2.11.1-01.jar:2.11.1-01]
      7 frames
    4. ${project.groupId}:${project.artifactId}
      DefaultScheduledTask.call
      1. org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418)[nexus-scheduler-2.11.1-01.jar:2.11.1-01]
      1 frame
    5. ${project.groupId}:${project.artifactId}
      MDCAwareCallable.call
      1. org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44)[nexus-core-2.11.1-01.jar:2.11.1-01]
      1 frame
    6. Shiro
      SubjectCallable.call
      1. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.2.3.jar:1.2.3]
      2. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.2.3.jar:1.2.3]
      2 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)[na:1.7.0_71]
      2. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[na:1.7.0_71]
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[na:1.7.0_71]
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_71]
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_71]
      6. java.lang.Thread.run(Thread.java:745)[na:1.7.0_71]
      6 frames