elishajeune Posted August 1, 2022 Share Posted August 1, 2022 Hi I'm new to Jaspersoft.In our organization, we are using Tibco Jaspersoft 6.0.1 Community version. We recently changed the existing FTP in the scheduled reports. The connectivity test button in the scheduled job shows successful connectivity but when the job runs at its scheduled time it encounters "Failed to upload file error" Report unit: /Reports/R11_1/R11_1_Scheduled Quartz Job: ReportJobs.job_547978 Quartz Trigger: ReportJobs.trigger_547976_1 Exceptions: report.scheduling.error.upload.to.ftp.server com.jaspersoft.jasperserver.api.JSException: Fail to upload file sample.pdf at com.jaspersoft.jasperserver.api.engine.common.util.impl.FTPUtil.putFile(FTPUtil.java:209) at com.jaspersoft.jasperserver.api.engine.common.util.impl.FTPUtil.access$400(FTPUtil.java:36) at com.jaspersoft.jasperserver.api.engine.common.util.impl.FTPUtil$FTPServiceClientImpl.putFile(FTPUtil.java:171) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobFileSavingImpl.saveToFTPServer(ReportExecutionJobFileSavingImpl.java:207) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobFileSavingImpl.save(ReportExecutionJobFileSavingImpl.java:91) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:528) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:224) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)Is there a property file we need to change to make it work? Link to comment Share on other sites More sharing options...
vchiem Posted August 1, 2022 Share Posted August 1, 2022 It connects fine..just failed to upload. Probably a permissions related issue preventing the putting of the file in the location. If you want to see the PUT operations with the actual path then enable the logger component:com.jaspersoft.jasperserver.api.engine.common.util.impl.FTPUtilin the Server Settings -> Log Settings page (need superuser account) More information on debugging FTP can be found in this wiki article:https://community.jaspersoft.com/wiki/debugging-ftp-connection-scheduled-report-jobsThe putFile method has following code: private static void putFile(FTPClient ftpClient, String fileName, InputStream inputData) throws Exception { if (ftpClient == null) { throw new JSException("Please connect to FTP server first before changing directory!"); } if (log.isDebugEnabled()) { log.debug("START: FUT FILE = " + fileName); } ftpClient.setFileType(2); boolean state = ftpClient.storeFile(ftpClient.printWorkingDirectory() + "/" + fileName, inputData); if (log.isDebugEnabled()) { log.debug("END: FUT FILE = " + fileName + " STATE = " + state); } if (!state) { throw new JSException("Fail to upload file " + fileName); } }[/code] Link to comment Share on other sites More sharing options...
rohanbhatt550 Posted August 1, 2022 Share Posted August 1, 2022 Thank you so much for sharing all this wonderful information !!!! It is so appreciated!! You have good humor in your thread. So much helpful and easy to read! Link to comment Share on other sites More sharing options...
saurabh.reportsinsights Posted September 5, 2022 Share Posted September 5, 2022 I am market Research associate at rubix market research...this insformation is very helpful..thank you so muvh for sharing this bloghttps://www.rubixmarketresearch.com/ Link to comment Share on other sites More sharing options...
ramanoak123 Posted September 12, 2022 Share Posted September 12, 2022 Rubix Market ResearchRubix Market Research is a market research & business consulting firm offers global as well as regional industry reports and customized analysis for different industry segmentshttps://www.rubixmarketresearch.com/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now