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 に答える