Jump to content
We've recently updated our Privacy Statement, available here ×

Scott

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by Scott

  1. This problem relates to class path issues.

     

    I fixed this by moving the jars I listed in the original post, to the jboss/server/default/lib folder.

     

    I then removed those jars from the .war and .ear and also remove all entries related to these jars from the respective manifest entries.

     

    This works for applications packaged as .ear j2ee apps.

  2. Hi,

     

    I have written a small j2ee app using Jasper Reports and servlets that I am trying to deploy on JBoss 4.0.3SP1.

     

    -------------------------------

    The Jasper jars I am using are:

    commons-collections-2.1.jar

    commons-digester-1.7.jar

    commons-javaflow-20060411.jar

    commons-logging-1.0.2.jar

    commons-logging-api-1.0.2.jar

    itext-1.3.1.jar

    jasperreports-1.2.5.jar

    poi-2.0-final-20040126.jar

     

     

     

    The app starts up fine but when I try to use the JasperFillManager in my code to fill the report I get the following error:

     

     

     

    java.lang.ClassCastException: net.sf.jasperreports.engine.design.JRJavacCompiler

    at net.sf.jasperreports.engine.design.JRDefaultCompiler.getCompiler(JRDefaultCompiler.java:201)

    at net.sf.jasperreports.engine.design.JRDefaultCompiler.loadEvaluator(JRDefaultCompiler.java:216)

    at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:402)

    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:350)

    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:92)

    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:74)

    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)

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

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

     

     

     

    My pdf gen code looks like this:

     

    File reportFile = null;

    JasperPrint jasperPrint = null;

     

    reportFile = new File(getLocations(). getReportLocation(NamesOfReports.QUOTATION_REPORT));

     

    JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());

     

    Map parameters = new HashMap();

     

    jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new QuotationDataSource());

     

    byte[] bytes = JasperExportManager.exportReportToPdf(jasperPrint);

     

    os.write(bytes);

    os.flush();

     

     

     

    Any ideas?

     

    Many thanks

    Scott.

    Post edited by: Scott, at: 2006/08/14 10:12

×
×
  • Create New...