Jasper Report Subreport problems

Hi!
Sorry for my English.
I create a report including a subreport in Ireport
I compile and run it and it's ok.
When i create my java class to can print report in my application i have
this error Error loading object from file : c:\tmp.jasper where tmp.jasper is complied file of my subreport.
My java code is
public void print_report(ResultSet tmp_res)
String xmlFileName =
"c:\\test.jrxml";
jasperFileName =
"c:\\test.jasper";
JRDataSource jrds = new JRResultSetDataSource(
tmp_res);
try {
JasperCompileManager.compileReport(xmlFileName);
// JasperCompileManager.compileReportToFile(xmlFileName,
// jasperFileName);
catch (JRException ex1)
System.out.println(ex1.getMessage());
HashMap map = new HashMap();
net.sf.jasperreports.engine.JasperPrint print = null;
try {
print = JasperFillManager.fillReport(report, map, jrds);
new JasperPrintManager().printReport(print, true);
catch (JRException ex) {
System.out.println(ex.getMessage());
Can you help me?
Thanks

This link will be help full for you.
You need to set a parameter in java for .jasper path.
http://forum.java.sun.com/thread.jspa?forumID=38&threadID=670802

Similar Messages

  • Pyro Jasper Report Tag problem

    Don't know if this is the right place to post this. I have an
    app I'm currently working on that needs a reporting module
    included. Found a tag on the Exchange
    (<cf_Pyro_JasperReports>) makes use of the Jasper Report API.
    Designed my reports with iReport, and all works fine on Adobe's CF
    server, however due to cost this is being deployed on Railo's CF
    server. The tag was specifically built for Adobe.
    I made some changes in the tag which should be okay, but
    Railo keeps throwing an error message "
    can not load class through its string name, because no
    definition for the class with the specifed name
    [dori.jasper.engine.JasperManager] could be found" which means
    all the necessary jar files (Jasper API) for generating the report
    might not be in the right dir.
    Tried all I can and still come up with the same error even
    after placing the files where I feel they should be and restarting
    the server. Has anyone worked with this tag or Railo before, please
    would appreciate any assistance.
    Thanks

    I imagine you could place the necessary jar files in the
    railo\lib directory if there are no conflicts. Though I would think
    there is a central directory for external jars, like \WEB-INF\lib
    or \ext-webapp. Try asking over at
    http://tech.groups.yahoo.com/group/railo_talk/.
    Let us know what you discover.
    Good Luck

  • Problem while incrementing a variable in Jasper Reports

    Hi
    I am using Jasper Reports for designing reports. These reports will be used by my Java application.
    But there is problem while I am trying to increment a variable depending on some condition.
    Requirement: I have to display information about all the residents in a hospital in a single report. Resident information will be fetched from the XML file. When a resident ID is found in the XML, then the variable(resno) shoud be incremented. I have set the initial value to 1.
    Problem: Only for the first resident, resno is showing as 1. For all the remaining residents, its showing as 0 (zero).The variable 'resno' is not incrementing for each resident.
    Even the ResidentID is not null. All the ResidentID's exists in the XML file.
    Please find the code below.
    <variable name="resno" class="java.lang.Integer" incrementType="Group" incrementGroup="residentbrk" calculation="Count">
    <initialValueExpression><![CDATA[new Integer(1)]]></initialValueExpression>
    </variable>
    <group name="residentbrk" isStartNewPage="true">
    <groupExpression><![CDATA[$F{ResidentID}]]></groupExpression>
    <groupHeader>
    <band height="16">
    <textField hyperlinkType="None">
    <reportElement positionType="Float" x="0" y="-1" width="96" height="17"/>
    <textElement>
    <font isBold="true"/>
    </textElement>
    <textFieldExpression class="java.lang.String"><![CDATA[$R{residentno}]]></textFieldExpression>
    </textField>
    <textField hyperlinkType="None">
    <reportElement positionType="Float" x="96" y="-2" width="64" height="18"/>
    <textElement/>
    <textFieldExpression class="java.lang.Integer"><![CDATA[$V{resno}]]></textFieldExpression>
    </textField>
    </band>
    </groupHeader>
    </group>
    Could you please provide a solution for this.

    Not clear at all. May be like this
    declare
    v_temp varchar2(100);
    v_final number;
    begin
    --loop
    v_temp:='sun';
    v_temp:=translate(lower(v_temp), '1abcdefghijklmnopqrstuvwxyz', '1');
    dbms_output.put_line('Temp:'||v_temp);
    v_temp := v_temp || 'Mon5.1';
    v_temp:=translate(lower(v_temp), '1abcdefghijklmnopqrstuvwxyz', '1');
    dbms_output.put_line('Temp:'||v_temp);
    v_temp:= v_temp || 'Tue';
    v_temp:=translate(lower(v_temp), '1abcdefghijklmnopqrstuvwxyz', '1');
    dbms_output.put_line('Temp:'||v_temp);
    v_final:=to_number(v_temp);
    dbms_output.put_line('v_final'||v_final);
    --coalesce
    --end loop;
    end;
    /

  • Problem in using Jasper Reports with JFrames

    Hi,
    I am using Jasper Reports in Swings.
    I could Generate Jasper Reports from JFrames with out any problem,
    but while closing the Report, the JFrame is also getting closed automatically.
    this should not happen for my application.
    So, how could i restrict the JFrame from exiting when Jasper Reports are closed.
    Thanx in advance.
    Reddy

    Create jasperviewer object as JasperViewer jasperViewer = new JasperViewer(jasperPrint, false);

  • Problems with jasper report pdf exporting

    Hello,
    I coded a simple servlet to view a jasper report (created with iReport) after clicking on the right button in the jsp.
    Here is the problem:
    net.sf.jasperreports.engine.JRRuntimeException: Error evaluating expression :
         Source text : (java.awt.Image)it.businesslogic.ireport.chart.DefaultChartFactory.drawChart(new String[]{"chartName=Pie3D","depthFactor=0.2","titlePosition=1","width=245","plotBackground=[255,255,255]","serie1=SERIE_CONTA_RISPOSTE","serie0=SERIE_RISPOSTA","foregroundAlpha=0.33","tooltips=false","chartBackground=[255,255,255]","subtitle=","title=","legend=true","quality=2","height=168","antialias=true"}, (it.businesslogic.ireport.IReportScriptlet)$P{REPORT_SCRIPTLET})
         net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:604)
         net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:343)
         net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:311)
         net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:275)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1302)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
         net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:730)
         net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:632)
         net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
         net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
         net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:203)
         customer_care.servlet.Reporting.getReport(Reporting.java:74)
         customer_care.servlet.Reporting.processRequest(Reporting.java:50)
         customer_care.servlet.Reporting.doGet(Reporting.java:89)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Here is the code:
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            byte[] byte_array = null;
            try{
                File reportFile = new File(this.getServletConfig().getServletContext().getRealPath("/reports/torte_call_center_agenzie.jasper"));
                if (!reportFile.exists()) throw new JRRuntimeException("File jasper non trovato");
                String nomeFile = reportFile.getPath();
                Map parameters = new HashMap();
                parameters.put("codice_questionario", "2");   //just for testing
                ConnettitiAlDB c = new ConnettitiAlDB();
                Connection conn = c.Connettiti(Conf.db_principale);
                byte_array = JasperRunManager.runReportToPdf(fullpath_filename, parameters, connessione);
                conn.close();
            catch(JRException e){
                e.printStackTrace();
            catch(SQLException e) {
                e.printStackTrace();
            response.setContentType("application/pdf");
         response.setContentLength(byte_array.length);
         ServletOutputStream ouputStream = response.getOutputStream();
         ouputStream.write(byte_array, 0, byte_array.length);
         ouputStream.flush();
         ouputStream.close();
         }Any suggestion? That would be vital to me!
    Thanks in advance

    catching the JRRuntimeException and printing its stacktrace i saw that the jfree chart lib was missing.
    i put it in my libraries but now i got this error:
    java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfContentByte.transform(Ljava/awt/geom/AffineTransform;)V
         net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1468)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:484)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:448)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:413)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:250)
         net.sf.jasperreports.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:188)
         net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:205)
         customer_care.servlet.Reporting.getReport(Reporting.java:77)
         customer_care.servlet.Reporting.processRequest(Reporting.java:50)
         customer_care.servlet.Reporting.doGet(Reporting.java:92)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    com.lowagie.text.pdf.PdfContentByte.transform is inside the iText library.
    I had an old version so I updated it but nothing changed.
    Any suggestion?
    Thanks

  • Problem with Jasper Reports

    hi evrybody... i'm having a problem while using Jasper Reports. I'm trying to Export a jrxml file generated by JasperAssistant plug-in in eclipse. but all i'm having is an exception. the following is my code and the said exception:
    CODE:
    public class DataSourceApp
    private static final String TASK_HTML = "html";
    private static final String TASK_XLS = "xls";
    private static final String TASK_CSV = "csv";
    private static final String TASK_RUN = "run";
    public static void main(String[] args)
    String fileName = null;
    String taskName = null;
    taskName = "html";
    fileName = "path\\DataSourceReport.jasper";
    try
    long start = System.currentTimeMillis();
    if (TASK_HTML.equals(taskName))
    JasperPrint jPrint = new JasperPrint();
    HashMap parameters = new HashMap();
    Connection con = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:BOM_DSN","","");
    jPrint = JasperFillManager.fillReport("path\\DataSourceReport.jrxml", parameters, con);
    JasperExportManager.exportReportToHtmlFile(fileName);
    System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
    System.exit(0);
    catch (JRException e)
    e.printStackTrace();
    System.exit(1);
    catch (Exception e)
    e.printStackTrace();
    System.exit(1);
    EXCEPTION:
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    NESTED BY :
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    NESTED BY :
    net.sf.jasperreports.engine.JRException: Error loading object from file : C:\Eclipse\eclipse\workspace\test\BOM_Package\DataSourceReport.jrxml
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:89)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    Caused by: java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         ... 2 more
    hope you can help me asap.. thanks!
    --joms                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    HI All
    I am working on Jasper report Project and when i am filling the report through
    JasperFillManager.fillreport(String sourceFileName,Map parameters,Connection conn)
    I am getting following exception:(I have included common-collections 3.2.jar in my classpath)
    java.lang.NoClassDefFoundError: org/apache/commons/collections/ReferenceMap
         at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.<clinit>(JRAbstractJavaCompiler.java:58)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:489)
         at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:243)
         at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:411)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:418)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59)
         at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
    Please Suggest ;Thanks in advance

  • Jasper Report Problem

    hi 2 all,
    am trying to use jasper report in my project, am using jasper 0.5.2 older version ,
    i put the
    itext-1.3.1.jar
    jdt-compiler.jar
    jasperreports-1.1.0.jarin my project web-apps lib
    now am getting problem is,when i try to get .jasper file from the below code sipset
    JasperCompileManager.compileReportToFile(context.getRealPath("/jsp/Reports/att1.jrxml"));it was not throwing error but its not creating the *.jasper file , why it so,
    please help me...
    thanks 2 all,

    So i tried the same in Java.As a stand alone java code? or as a code in your webapp? Please make sure the required jar files are in your web-inf\lib

  • Jasper report problem in stretch fields

    Hi All
    i am making report in ireport and jasper report, by design and code.
    The height of the fields is not limited , that mean i can put in it a large sentence or a small one. So i use the property "Stretch with overflow" (or textField.setStretchWithOverflow(true); in code )
    the problem that i face is : the report i got is work fine but some tall sentences are splited in more than a page and the problem here that i don't know why it splited when there is a plenty of blank space in the page, when the other sentences is using this blank.
    in the end i am hope that i explain the problem well... so help me please in this issue.
    BEST REGARDS

    So i tried the same in Java.As a stand alone java code? or as a code in your webapp? Please make sure the required jar files are in your web-inf\lib

  • Problem in debuging jasper reports and ADF

    Hi
    I am using JDeveloper 11.1.2.2.0. Inside I created Fusion Web Application ADF, and on the index page created Go button. Now I created Servlet with doGet methode and conncected it to Go button. It is working OK.
    Now I want to run simple jasper report from servlet. Jasper report is based on empty dataset. Here is servlet code:
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ServletOutputStream servletOutputStream =response.getOutputStream();
    InputStream reportStream = getServletConfig().getServletContext()
    .getResourceAsStream("C:/Users/myDomain/Desktop/Reporting/ReportPDFPrazan.jasper");
    try
    JasperRunManager.runReportToPdfStream(reportStream,servletOutputStream,null, new JREmptyDataSource());
    response.setContentType(CONTENT_TYPE);
    servletOutputStream.flush();
    servletOutputStream.close();
    catch (JRException e)
    // display stack trace in the browser
    StringWriter stringWriter = new StringWriter();
    PrintWriter printWriter = new PrintWriter(stringWriter);
    e.printStackTrace(printWriter);
    response.setContentType("text/plain");
    response.getOutputStream().print(stringWriter.toString());
    When I hit Go button here what I get:
    java.lang.NullPointerException
         at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2265)
         at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2278)
         at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
         at java.io.ObjectInputStream.(ObjectInputStream.java:279)
         at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.(ContextClassLoaderObjectInputStream.java:53)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:214)
         at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:632)
         at net.sf.jasperreports.engine.JasperRunManager.runToPdfStream(JasperRunManager.java:428)
         at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:849)
         at view.com.lanaco.servlets.PrviServlet.doGet(PrviServlet.java:35)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    and so on(I can put whole stack if necery)
    I also imported this libraries inside ViewControl project:
         Jasperreports-4.7.1.jar
         Commons-beanutils-1.8.0.jar
         Commons-collections-2.1.1.jar
         Commons-digester-2.1.jar
         Commons-logging-1.1.1.jar
         IText-2.1.7.jar
         Groovy-all-1.7.5.jar
         Poi-3.7-20101029.jar
    Can someone help me with debuging. Please
    Edited by: MarcusO on 2012.10.23 05:18

    I found solution. It should be used like this:
    InputStream reportStream = new FileInputStream(new File("C:/Users/myDomain/Desktop/Reporting/ReportPDFPrazan.jasper"));
    So problem was in input stream. It works fine now.

  • Subreport of the jasper report displays blank, how do i solve this??

    i am creating a report which has subreport that is embeded in to the master report.
    When i previee it works fine but when i use it on my code it doesa'nt, it only display balank page.
    I could view the report individualy but not together.
    please guide me
    Thank you
    Master Report
    <subreport isUsingCache="true">
        <reportElement key="testingrpts_subreport1" x="21" y="72" width="517" height="100" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true"/>
        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
        <subreportExpression class="java.lang.String"><![CDATA["C:\\Documents and Settings\\uthays\\My Documents\\NetBeansProjects\\POSYS\\POSYS-war\\web\\testingrpts_subreport1.jasper"]]></subreportExpression>
       </subreport>

    hi i have improved the report but not yet solved it.
    i now got parameters that passes value. i understand the logic but when i try it, it doeant work
    <subreport>
                        <reportElement x="16" y="72" width="525" height="109"/>
                        <subreportParameter name="CURRENT_Order">
                             <subreportParameterExpression><![CDATA[$F{poheader_id}]]></subreportParameterExpression>
                        </subreportParameter>
                        <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
                        <subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "newsub.jasper"]]></subreportExpression>
                   </subreport>then i am using this in my java
    fillParams.put("pSubReportName", input);
           param.put("CURRENT_Order",new Integer(poheaderDataProvider.getValue("id").toString()));but still i could only list one at a time
    if any1 got any clue let me know please, thank you

  • Image Display Problem while exporting jasper report in EXCEL

    Hi
    I am using Jasper reports for my reporting work using java code.
    when i export my report in PDF then , report is ok and displaying Image properly.
    but when i export my report in EXCEL then , there is no image in my report, rest part is fine.
    Can anyone please help me in getting image in excel format also.
    thanks in advance
    Praveen

    I have not any problem in picture or logo.
    But I have an another problem.
    My Excel format produce multiple column,that is unefficient format.
    If you have not this problem please mail me at --- [email protected]

  • Jasper report using 2 or more subreports

    Hi
    This muralikrishna.a
    I am using IReport tool, In that I have created One report, in that I have created 2 sub reports. but first subreport is displaying and second sub report is not displaying. I am using JavaBean as DataSource.
    I deleted first subreport, second one is displaying, only one subreport is displaying , why second sub report is not displaying.
    Thanks
    Muaralikrishna

    Just another cross poster.
    [http://www.java-forums.org/new-java/14512-jasper-report.html]
    db
    edit And, with a different nic
    [http://forums.sun.com/thread.jspa?threadID=5361658]
    Edited by: Darryl.Burke

  • Jasper report font formating problem

    hi,
    i face a problem when i try to format the font during generate jasper report.
    i add the following code into the jrxml file, but it stil don't work.
    <textElement>
    <font isBold="true" isItalic="true" isUnderline="true" pdfFontName="Times-Bold"/>
    <textElement/>
    <text><![CDATA[Signed for and on behalf of )]]></text>
    note: i add the isBold="true", isUnderline="true" and pdfFontName="Times-Bold".
    can anybody helps me? Is quite urgent.
    thanks a lot!!
    eric

    So i tried the same in Java.As a stand alone java code? or as a code in your webapp? Please make sure the required jar files are in your web-inf\lib

  • Jasper Report Problem: No ClassDefError

    Here is the exception I bumped into when I tried to call my servlet using jasper. I have deployed my app as a WAR file including the necessary jasper jar files. I dont know why it cant find the class when I already included the jar files with it. I appreciate any help. Do i miss out anything here? Thanks a lot.
    java.lang.NoClassDefFoundError
         at sun.misc.Unsafe.ensureClassInitialized(Native Method)
         at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:20)
         at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
         at java.lang.reflect.Field.acquireFieldAccessor(Field.java:779)
         at java.lang.reflect.Field.getFieldAccessor(Field.java:760)
         at java.lang.reflect.Field.getLong(Field.java:398)
         at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1478)
         at java.io.ObjectStreamClass.access$400(ObjectStreamClass.java:47)
         at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:335)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.io.ObjectStreamClass.(ObjectStreamClass.java:333)
         at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:253)
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:453)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at java.util.ArrayList.readObject(ArrayList.java:547)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at dori.jasper.engine.util.JRLoader.loadObject(JRLoader.java:128)
         at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:288)
         at com.pejman.workspace.hrm.payroll.control.struts.PayrollReportAction.execute(PayrollReportAction.java:401)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:534)

    Hi nanzee.
    The problem u posted above looks similar to the one i'm facing now. I'm also getting a No ClassDefError when creating a jasper report on Linux. It works just fine on Windows 2k though.
    I was hoping if u can share more specific details on how you managed to solve this problem. Your solution just might work for me.
    Please shed more light on the ff:
    1. "It has something to do with my missing fc3 linux libraries so i did an rpm for the deprecated libraries " -- how is this done? I'm not that versed in Linux. ( Our company requires us to use Linux ...)
    2. "plus set something on my tomcat CATALINA_OPT portion "
    Thank in advance and hope to hear from you nanzee.

  • Jasper Subreports Problem.

    Hello,
    I'm new to Jasper and so far was able to create a datasource and fill a straightforward report and generate the pdf okay. (Web app)
    But as soon as I create a subreport it says error cannot load. I've read through this forum and found that you have to include your files into the Web-Inf/Classes folder. I've done that and now the error I get is:
    Error loading object from URL : file:/C:/eclipse3.1/ewong/workspace/wclc/.deployables/wclc/WEB-INF/classes/subreport.jasper
    The subreport currently has nothing except static text in the title. When I run this in iReports it finds my subreport and displays it in the master report fine. It's when I use java in my web app to do it, I get the error.
    Any suggestions?
    Thanks

    That line:     jp = JasperFillManager.fillReport(repJasper, param, ds);
    And my class is simple:
    //import
    public class Start {
         public void showReport() {
              String rep = "Book_Report.jasper";
              // bean list
              List bookList = getBooks();
              // Stream com o .jasper
              InputStream repJasper = getClass()
                        .getResourceAsStream(rep);
              // The datasource
              JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(
                        bookList);
              // Report Param
              Map param = new HashMap();
              JasperPrint jp = null;
              try {
                   jp = JasperFillManager.fillReport(repJasper, param, ds);
                   JasperViewer viewer = new JasperViewer(jp, true);
                   viewer.setVisible(true);
              } catch (JRException e) {
                   System.out.println(e.getMessage());
         public List getBooks() {
              List bookList = new ArrayList();
              Book b = new Book();
              b.setTitle("Thinking in Java ");
              b.setAuthor(" Bruce Eckel ");          
              bookList.add(b);
              return bookList;
         public static void main(String[] args) {
              new Start().showReport();
    }Book is a simple bean...
    I can?t see what i?m doing wrong...

Maybe you are looking for

  • How to change default font in Pages?

    how do we change the default font for Pages??

  • Problem in Portrail and Landscape

    Hi, I have created a report that contains two pages: the first page is in portrail , the other is in landscape. However, after printing through report runtime, the handout contains some unreadable words(code) in left hand corner of the 2nd page, ever

  • Units

    the prod order GR qty unit is ea. the same material we need to send to sub-contracting and PO price will be based on kgs. at the time of issing mat to sub-contractor we want system to calculate the equivalnt of ea in kgs so that it will be easy to ca

  • Can I use Adobe Master Suite CS5 that I purchased for use on a PC on my new iMac?

    In May 2011, I purchased the education priced edition of Master Suite CS5 for use on the PC I had at the time. Last week my PC died and I'm getting an iMac to replace it. Can I use the Master Suite that I have on my new iMac or will I have to spend m

  • Sizing guidelines for CE 7.1 and NWDI 7.1

    Dear Experts, One of our clients wants to develop the system with CE 7.1 and use NWDI for the lifecycle management of the software. I am looking for the sizing requirements for the development environment. Will anybody help me get the guidelines for