cancel
Showing results for 
Search instead for 
Did you mean: 

Redirecting crtmp files location from /tmp to Customized location

0 Kudos

Hi Bhushan,

Thanks for your interest. We are facing an issue using crjava-runtime_12.2.218 components.

We followed the API from http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm.

While running Reports for spooling (execute and export to rpt format)  and online view using JSP, most of the reports are generating following crtmp files in /tmp path.

db-2096395574706184848.crtmp

dvsi-6652398058930214927.crtmp

tot-4915059854737418707.crtmp

But Few reports are Generating crtmp files with Huge Size (More than 9 GB) and report execution getting failed to due to “Caused by: java.io.IOException: No space left on device”.

We are running Application on WAAS (Websphere As A Service) infrastructure with Load Balancer and DB2 9.7.

OS : Linux

We need your advice to redirect the crtmp files to customized location based on application need.

Note : these problematic reports are running without any issue on Enterprise Edition. (Report server)

Thanks & regards

  1. Viswa..

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi viswa,

The temp folder location CR uses to create temp files is stored in Windows Environment variables TEMP, TMP.

The only way to redirect CR temp files to other location is to point the Win Env variable to that location.

Though this can be done manually, you could check if some native Java APIs provide this functionality to be implemented in code.

Make sure the path change haoppens before loading CR report object in code.

Thanks,

Bhushan.

0 Kudos

Hi Bhushan,  
Thanks for your advice.
We relocated the crtmp files using below Java API to /apps path.
System.setProperty("java.io.tmpdir", "/apps");
Here I attached the sample code which we used for exporting the reports.
---------------------------------------------------------------------------------------------------------
reportSource = boReportClientDocument.getReportSource();
session.setAttribute("reportSource", reportSource);
ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream) boReportClientDocument.getPrintOutputController().export(ReportExportFormat.crystalReports);
boReportClientDocument.close();
byte byteArray[] = new byte[byteArrayInputStream.available()];
File file = new File(outputFileName);
FileOutputStream fileOutputStream = new FileOutputStream(file);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());
int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());
byteArrayOutputStream.write(byteArray, 0, x);
byteArrayOutputStream.writeTo(fileOutputStream);
byteArrayInputStream.close();
byteArrayOutputStream.close();
fileOutputStream.close();
--------------------------------------------------------------

Please advice in which scenario the crtmp files will be generated. because only few reports are generating huge crtmp files.
Please note We are not facing this Huge crtmp files using Crystal Report Server Edition.
Is this due to JRC API or due to  SQL Query in the reports?
Please advice the best practices to overcome this huge crtmp files.

Thanks & regards
Viswa..

Answers (0)