dogmeat
dogmeat

Reputation: 61

JasperReports Memory Leak

I am working in a webapp, it uses JasperReports 5 (jasperreports-5.0.1.jar) but is leaking memory until java.lang.OutOfMemoryError, this app generates dinamic reports between 10 to 100 pages.

I am using MAT in order to know what is going on, as you can see in the following pictures, JasperReports is retaining memory:

net.sf.jasperreports.engine.export.legacy.BorderOffset$1

Histogram of grouped by package: Histogram of grouped by package

The names Plantilla and SubReport in Histogram are clases related to our reports generated with JasperReports.

This web app runs on the following environment:

-WebLogic 11g

-jrockit-jdk1.6.0_45-R28.2.7-4.1.0

-Xms2048m -Xmx2048m

-Oracle Linux

If you have faced something similar, let me know your expirience.

Upvotes: 6

Views: 3328

Answers (1)

Pradeep
Pradeep

Reputation: 75

use .jasper file to fill the report instead of .jrxml because.jasper is compiled format and . jrxml is not compiled , where ever you try to fill the report by using .jrxml it first compile and then do the rest processing which results in more memory consumption

Upvotes: 3

Related Questions