Jump to content
We've recently updated our Privacy Statement, available here ×

Change in FTP server encounters Fail to upload file during scheduled report job


elishajeune

Recommended Posts

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

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

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.FTPUtil

in 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-jobs

The 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

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...