Reputation: 11
Hi I am getting the below error while trying to FTP the file to destination..
Code I used:
final String destinationFile = destinationFolder + inputFile.getName();
OutputStream output = null;
try {
output = new FileOutputStream(destinationFile);
} catch (Exception e) {
System.out.println("Error creating output file");
e.printStackTrace();
}
Exception:
java.io.FileNotFoundException: \bsgdata1\dba1\jubair\ftpPDF\TMPAAA6CaWnR.pdf (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.finacle.pdf.reportgenerator.util.FtpUtil.ftp(FtpUtil.java:96)
at com.finacle.pdf.reportgenerator.PdfReportGenerator.generate(PdfReportGenerator.java:86)
at com.finacle.pdf.reportgenerator.PdfReportGenerator.main(PdfReportGenerator.java:35)
Exception in thread "main" java.lang.NullPointerException
at com.finacle.pdf.reportgenerator.util.FtpUtil.ftp(FtpUtil.java:110)
at com.finacle.pdf.reportgenerator.PdfReportGenerator.generate(PdfReportGenerator.java:86)
at com.finacle.pdf.reportgenerator.PdfReportGenerator.main(PdfReportGenerator.java:35)
Upvotes: 1
Views: 1404
Reputation: 997
It seems like the File directory is not reachable/acceesable. Most likely it is because either the network/ftp is not available or the path is not correct. if you can place the entire code/project I can assist you in debuging the same
Upvotes: 1