Jump to content
Changes to the Jaspersoft community edition download ×

Virtualizer Error


fatsy

Recommended Posts

Hallo,

I'm trying to run my Java code with a virtualizer in it I'm having the following error which is attached to a file below. My java code is written below.

My question is why this error occurs.I've tried all my best to solve it but didn't succeed.

 

Thanks in advance

 

regards

Fatsy

 

public class UseCase {

 

/**

* @param args unused

*/

public static void main(String[] args) {

JasperReport jasperReport;

JasperPrint jasperPrint;

Map parameter = new HashMap();

 

try {

JRFileVirtualizer virtualizer = new JRFileVirtualizer(2,"tmp");

parameter.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);

JRXmlDataSource xml = new JRXmlDataSource(new File("edb-usecases.xml"), "/UseCaseGroup/UseCaseGroup/UseCase");

jasperReport = JasperCompileManager.compileReport("UseCase.jrxml");

jasperPrint = JasperFillManager.fillReport(jasperReport,parameter, xml);

JasperExportManager.exportReportToPdfFile(jasperPrint,"usecase.pdf");

virtualizer.cleanup();

}

catch (JRException e) {

e.printStackTrace();

}

}

 

} [file name=error-40e640650ed0001818de5f5f9ccc12aa.txt size=4281]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/error-40e640650ed0001818de5f5f9ccc12aa.txt[/file]

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Iam also facing problem in using virtualizer.I get the follwoing error.

net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: The system cannot find the path specified at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.virtualizeData(JRAbstractLRUVirtualizer.java:450)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUScanMap.processRemovedLRU(JRAbstractLRUVirtualizer.java:137)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUScanMap.removeLRU(JRAbstractLRUVirtualizer.java:123)

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

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache.put(JRAbstractLRUVirtualizer.java:198)

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.registerObject(JRAbstractLRUVirtualizer.java:335)

at net.sf.jasperreports.engine.base.JRVirtualPrintPage.<init>(JRVirtualPrintPage.java:182)

at net.sf.jasperreports.engine.fill.JRBaseFiller.newPage(JRBaseFiller.java:1182)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.addPage(JRVerticalFiller.java:1115)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1187)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1212)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:596)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:229)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)

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

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

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

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)

 

I use the virtualizer as below:

 

JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "TmpPrint");

parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);

JasperPrint print = JasperFillManager.fillReport(report, parameters, dataSource);

virtualizer.setReadOnly(true);

bytes = JasperExportManager.exportReportToPdf(print);

 

 

Please help me in using virtualizer as we run of memory because of huge data.

Link to comment
Share on other sites

Iam also facing problem in using virtualizer.I get the follwoing error.

 

net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: The system cannot find the path specified at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.virtualizeData(JRAbstractLRUVirtualizer.ja va:450)

 

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUScanMap.processRemovedLRU(JRAbstr actLRUVirtualizer.java:137)

 

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache$LRUScanMap.removeLRU(JRAbstractLRUVi rtualizer.java:123)

 

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

 

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer$Cache.put(JRAbstractLRUVirtualizer.java: 198)

 

at net.sf.jasperreports.engine.fill.JRAbstractLRUVirtualizer.registerObject(JRAbstractLRUVirtualizer.ja va:335)

 

at net.sf.jasperreports.engine.base.JRVirtualPrintPage.<init>(JRVirtualPrintPage.java:182)

 

at net.sf.jasperreports.engine.fill.JRBaseFiller.newPage(JRBaseFiller.java:1182)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.addPage(JRVerticalFiller.java:1115)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1187)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1212)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:596)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:229)

 

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)

 

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

 

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

 

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

 

at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)

 

 

 

I use the virtualizer as below:

 

 

 

JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "TmpPrint");

 

parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);

 

JasperPrint print = JasperFillManager.fillReport(report, parameters, dataSource);

 

virtualizer.setReadOnly(true);

 

bytes = JasperExportManager.exportReportToPdf(print);

 

 

 

 

 

Please help me in using virtualizer as we run of memory because of huge data.

Link to comment
Share on other sites

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...