java.nio.file.DirectoryNotEmptyException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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}
    via by Rich Seddon,
  • 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}
    via by Peter Lynch,
  • IDE 1.6.5 is now available for download - Page 10
    via by Unknown author,
    • java.nio.file.DirectoryNotEmptyException: /home/rseddon
    • exus/sonatype-work
    • exus/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]
    No Bugmate found.