I am getting "Too many levels of symbolic links" I am using Java NIO2 :- This is run on Unix. Any thoughts would be of great help. Thanks.
Deep inside the code I am calling
Path currentFolder = Paths.get(currentFolder, date);
and at some point in flow - I am trying to get the currentfolder as in the below method..
public Path getNewFolder() {
return currentFolder.resolve("test").resolve("new");
//where "test" and "new" contains date in between the path. example currentFolder path: "/base/test/2014106/new"
}
But I getting below exception..
java.nio.file.FileSystemException: /base/test/2014106/new: Too many levels of symbolic links
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
at sun.nio.fs.UnixException.asIOException(UnixException.java:111)
at sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.readNextEntry(UnixDirectoryStream.java:171)
at sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.hasNext(UnixDirectoryStream.java:201)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:198)
at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:69)
at java.nio.file.Files.walkFileTree(Files.java:2591)
at java.nio.file.Files.walkFileTree(Files.java:2624)