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 Andrew Green, 1 year ago
via kafka-dev by Neha Narkhede (JIRA), 1 year ago
via GitHub by Firxiao
, 1 year ago
via GitHub by Patrick15a
, 7 months ago
No such file or directory
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:947)
at com.google.gwt.dev.javac.PersistentUnitCache.createCacheFile(PersistentUnitCache.java:120)
at com.google.gwt.dev.javac.PersistentUnitCache.(PersistentUnitCache.java:264)
at com.google.gwt.dev.javac.UnitCacheFactory.get(UnitCacheFactory.java:59)
at com.google.gwt.dev.javac.CompilationStateBuilder.init(CompilationStateBuilder.java:403)
at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:917)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1083)
at com.google.gwt.junit.JUnitShell.getUnitTestShell(JUnitShell.java:707)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:652)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.codehaus.mojo.gwt.test.MavenTestRunner.doRun(MavenTestRunner.java:105)
at junit.textui.TestRunner.start(TestRunner.java:180)
at org.codehaus.mojo.gwt.test.MavenTestRunner.main(MavenTestRunner.java:63)

Users with the same issue

Once, 2 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.