Jump to content
Changes to the Jaspersoft community edition download ×

heap space error with Virtualizer


yaramada123

Recommended Posts

Hi,

I am using Virtualizer, but still getting heap space error::

 

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Unknown Source)

at java.io.ByteArrayOutputStream.write(Unknown Source)

at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source

)

at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(Unk

nown Source)

at java.io.ObjectOutputStream.writeObject0(Unknown Source)

at java.io.ObjectOutputStream.writeObject(Unknown Source)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.writeData(J

RAbstractLRUVirtualizer.java:578)

at net.sf.jasperreports.engine.fill.JRSwapFileVirtualizer.pageOut(JRSwap

FileVirtualizer.java:92)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.virtualizeD

ata(JRAbstractLRUVirtualizer.java:537)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUSc

anMap.processRemovedLRU(JRAbstractLRUVirtualizer.java:141)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUSc

anMap.removeLRU(JRAbstractLRUVirtualizer.java:127)

at org.apache.commons.collections.LRUMap.put(Unknown Source)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache.put(J

RAbstractLRUVirtualizer.java:202)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.registerObj

ect(JRAbstractLRUVirtualizer.java:427)

at net.sf.jasperreports.engine.base.JRVirtualPrintPage.<init>(JRVirtualP

rintPage.java:182)

at net.sf.jasperreports.engine.fill.JRBaseFiller.newPage(JRBaseFiller.ja

va:1416)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.addPage(JRVerticalF

iller.java:1222)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVer

ticalFiller.java:1294)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRV

erticalFiller.java:1319)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooter(JRV

erticalFiller.java:750)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupFooters(JR

VerticalFiller.java:722)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(J

RVerticalFiller.java:266)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVertic

alFiller.java:117)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:

791)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:

695)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63

)

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa

nager.java:402)

at TRExpenseLogReport.runReport(TRExpenseLogReport.java:243)

at TRExpenseLogReport.main(TRExpenseLogReport.java:277)

 

Here is the virtualizer code I have used:

JRConcurrentSwapFile jrSwapFile = new JRConcurrentSwapFile("C:/Temp",30,4);

JRSwapFileVirtualizer virtualizer = new JRSwapFileVirtualizer(4,jrSwapFile,true);

 

data1.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);

 

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, data1, jdbcConnection);

 

JRVirtualizationContext.getRegistered(jasperPrint).setReadOnly(true);

 

Please help me in getting around this problem, it is very very important to get it working....plese help!!!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...