Search code examples
mysqljasper-reportsjaspersoft-studiobigdata

How could Jaspersoft studio run direct query or live connection to Big database


I am using Jaspersoft studio 6 and handle big database. My data is in Mysql and has 7 million docs in one table.

When I use Jaspersoft studio to connect to MySql, then It will connect to MySQL, run the query e.g 'select a, b from table1' and extract the datasets from MySql. But, here my table is 7 million docs and it will raise OutOfMemoryError errors as followed:

net.sf.jasperreports.engine.JRException: java.lang.OutOfMemoryError: Java heap space
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:524)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$20(ReportControler.java:499)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:380)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.OutOfMemoryError: Java heap space............

It seems to run out of the JVM memory.

How could I run direct query ( or establish live connection) to MySql database WITHOUT importing the datasets to Jaspersoft?

From Jaspersoft manual, it could also handle big data from Hadoop etc. I have not used hadoop yet, but if every time Jaspersoft studio needs to import whole datasets instead of establishing live connection, how could it handle very big data sets? such as Data in TB scales


Solution

  • You need to configure a report virtualizer in JSS so that when a big report is run, temporary files on disk are used to store document pages and avoid consuming memory.

    In JSS, you need to go to Preferences/Jaspersoft Studio/Report Execution and see the checkbox for activating a file-based virtualizer. You can first try with default configuration and see how it goes.