im facing little weird proplem
i have a service that read file from local server i used java.nio.file for that
it works perfectly if the file just created or uploaded to the folder, if the file is old it will give me this error
java.io.FileNotFoundException: File '/mnt/A/B/123.png' does not exist
and to let the old files work again i need to ssh the server and open the directory and list files
after i do that it return working for a while then it stops again and gives the same above error
the server that I'm using is Apache Tomcat/9.0.36 this is my code
return Files.readAllBytes(getPath(resourceLoader, uploadDir + "/" + directory + "/" + fileName));
i tried to use org.apache.commons.io.FileUtils but no luck I'm getting the same issue
return org.apache.commons.io.FileUtils.readFileToByteArray(getPath(resourceLoader, uploadDir + "/" + directory + "/" + fileName).toFile());
the issue was fixed by restarting the server that is mounting the files