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

suryakantmandal

Members
  • Posts

    4
  • Joined

  • Last visited

suryakantmandal's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi , Is there any way to delete virtual files created by report after process encountered OutOfMemory? I noticed that cleanup() doesn't delete those files once server has restarted/OOM error. Thanks, Surya
  2. Is there any way to retrieve the names of temp virtual files being created using JRFileVirtualizer. I can see the names of files(pages) in JasperPrint object but how to get JRPrintPage ->Stor -> Blocks- >uid(having file identifier) Actually I want to perform force cleanup temp files once process has completed successfully in order to save the disc space.
  3. @howza If multiple repors are running simultaneously then cleaning the entire directory will delete the virtual files of another report which may be still in progress.
  4. I am using JRFileVirtualizer to prepare the report but its creating thousands of temp files virt**** which is creating disc full problem on server. I have called virtualizer.cleanup(); to clean the files created post the report has generated but this also not delteing the temp files. Is there any way to get the names of temp files created so that I can ran manual cleanup matching those name before ending the process. if(outputType.equals(OutputTypeEnum.EXCEL)) { JasperFillManager jasperFillManager = JasperFillManager.getInstance(DefaultJasperReportsContext.getInstance()); JasperPrint jasperPrint = jasperFillManager.fill(reportStream, parameterMap, connection); JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outputFilename); exporter.exportReport(); result.setReportContent(FileUtils.readFileToByteArray(new File(outputFilename))); result.setOutputFile(new File(outputFilename)); } ==== JRFileVirtualizer virtualizer = new JRFileVirtualizer(VIRTUAL_PAGE_SIZE, makeTempDirectory()); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); Thanks, Surya
×
×
  • Create New...