1

嗨,我在尝试将文件 FTP 到目标时收到以下错误..

我使用的代码:

 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();
    }

例外:

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)
4

1 回答 1

1

似乎文件目录不可访问/可访问。很可能是因为网络/ftp 不可用或路径不正确。如果您可以放置​​整个代码/项目,我可以帮助您调试相同的

于 2013-02-28T09:11:53.097 回答