java.lang.Exception: java.io.IOException: No such file or directory

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

If the directory ../.foo/bar/ doesn't exist, you can't create a file there, so make sure you create the directory first.

File f = new File("somedirname1/somedirname2/somefilename");
if (!f.getParentFile().exists())
    f.getParentFile().mkdirs();

Solutions on the web

via Google Groups by Basith Zainurrohman, 1 year ago
java.io.IOException: No such file or directory
via Google Groups by George Hant, 6 months ago
java.io.IOException: No such file or directory
via Google Groups by Carsten Steckel, 1 year ago
java.io.IOException: No such file or directory
via Google Groups by Udayakumar Pandurangan, 1 year ago
java.io.IOException: No such file or directory
via Google Groups by Sayantan Raha, 1 year ago
via Google Groups by SAURABH JAIN, 1 year ago
java.io.IOException: No such file or directory
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at java.io.File.createTempFile(File.java:2070)
at io.druid.indexer.IndexGeneratorJob$IndexGeneratorReducer.reduce(IndexGeneratorJob.java:558)
at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:171)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:627)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

Once, 3 weeks ago
Once, 1 month ago
Once, 1 month ago
4 times, 2 months ago
Once, 2 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.