When trying to use the ExportUtil.exportAll() method, a java.io.FileNotFoundException is thrown if the given directory does not have an existing file for every table.
Wouldn't it make sense for the exportAll() method to check whether a file exists for each table, and create said file if it does not exist?
I've attached a java file demonstrating the issue. Thanks (and your library is awesomely useful!)
Are you sure the directory exists? the export methods don't require the file to already exist, just the directory.
Yes, I checked and the directory exists and is world writable (chmod 777).
I worked around it for now by iterating db.getTableNames() and creating empty csv files before calling exportAll().
can you include a stack trace, a table name, and the directory name?
the code in question is just using "new FileWriter(File)", which will create the file if it doesn't currently exist.
are you using a different user to run the program than the owner of the directory?
Last edit: James Ahlborn 2014-04-24
I cannot seem to reproduce it now, and I suspect it may have been a user/permissions problem after all.
Sorry!
no problem.