1359205 - Error: "java.lang.OutOfMemoryError: Java heap space" when exporting Crystal report with large dynamic image using JRC

SAP Knowledge Base Article - Public

1359205 - Error: "java.lang.OutOfMemoryError: Java heap space" when exporting Crystal report with large dynamic image using JRC

Symptom

  • Error: "java.lang.OutOfMemoryError: Java heap space" occurs in Tomcat console when exporting a Crystal report with large size dynamic image by Java Reporting Component (JRC).
  • Exception "com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: ---- Error code:-2147467259" also appears in Internet Explorer (IE).

Environment

  • JRC 11.8.4.1094
  • Crystal Reports (CR) XI Release 2

Reproducing the Issue

  1. Create a CR report. Add a image file from local computer.
  2. Right-click this image. Click Format Graphic.
  3. Click Picture tab in Format Editor.
  4. Click Formula Editor beside the Graphic.
  5. Input a dynamic image path which is relative to the Web application folder, such as “/largPic.jpg".
  6. Put an image file largPic.jpg which size is at least 130 kb into the same relative path of your Web application.
  7. Open this report by JRC web application. 
  8. View report in CR web Viewer.

The java.lang.OutOfMemoryError "Java heap space" occurs in Java application server console.

Even if increasing Java heap size to 1 GB, this error still occurs.

Cause

This issue is identified and tracked under ADAPT01130437.

Resolution

Workaround:

  • Reduce the image size to lesss than 130kb.

Resolution:

  • This issue has been fixed in CR4E 2.0 SP1. Install CR4E 2.0 SP1 or above to solve this issue.

Keywords

KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , Bug Filed

Product

Crystal Reports for Java 1.0