net.sf.jasperreports.engine.JRException: Error trying to export to file : TransformXMLtoHTML\PDFReports\TransportLabel_3879017041.pdf
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:355)
at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:126)
at com.dhl.sop.label.LabelReportController.generateSOPLabel(LabelReportController.java:461)
at com.dhl.sop.label.LabelReportHandler.generate(LabelReportHandler.java:82)
at com.dhl.sop.label.LabelReportHandler.main(LabelReportHandler.java:68)
Caused by: java.io.FileNotFoundException: TransformXMLtoHTML\PDFReports\TransportLabel_3879017041.pdf (系統找不到指定的路徑。)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:349)
... 4 more
可能原因:
1.路徑不完整,相對路徑找不到
2.沒有首先生成這個文件,就對這個文件進行讀寫