awecz / indic-jasper

Automatically exported from code.google.com/p/indic-jasper
0 stars 0 forks source link

Error In creating Hind PDF #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. I have follwed these steps:-

try {
    String  qry="  select D.INT_DIST_ID_P ,D.VCH_DIST_NAME_ENG " +
        " from workflow.wkf_mst_district D ";

        pstmt=conn.prepareStatement(qry);

        rs=pstmt.executeQuery();

        } catch (SQLException e1) {

        e1.printStackTrace();

        }

        try {

            HashMap map = new HashMap();
            map.put("planYear", "2008-2012");

      jasperReport =JasperCompileManager.compileReport(relativePath+"/reports/TestPDF.jrxml");
            jasperPrint = JasperFillManager.fillReport(jasperReport, map, jrRS );

            JRPdfExporter exporter = new JRPdfExporter();

            System.out.println("OPENOFFICE_PATH = "+System.getenv("OPENOFFICE_PATH"));

            exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

            exporter.setParameter(JRPdfExporterParameter.CHARACTER_ENCODING, "UTF-8");

            exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8");

            try {
                relativePath = "C:\\jboss-portal-2.7.2\\server\\default\\deploy\\jboss-web.deployer\\ROOT.war";
            exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, new FileOutputStream(new File(relativePath+"/reports/indic_jasper_output.pdf")) );

            } catch (FileNotFoundException e) {

            e.printStackTrace();

            }

            exporter.exportReport();

        } catch (JRException e) {

        e.printStackTrace();

        } finally{
            try{
                 if(pstmt!=null)pstmt.close();
                 if(conn!=null)conn.close();
                 }catch(Exception e){e.printStackTrace(); }
        }

        }

After this when run this code it give exceptions :

Caused by: java.lang.NoSuchFieldError: FILTER
    at in.cdac.ilcg.jasperreports.pdfexporter.JRPdfExporter.exportReport(JRPdfExporter.java:241)
    at com.mentor.phq.modernization.impls.LetterImpl.TestPDF(LetterImpl.java:888)
    at com.mentor.phq.modernization.actions.LetterAction.letterReport(LetterAction.java:239)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
    at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
    at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    ... 208 more

Original issue reported on code.google.com by ankitdwi...@gmail.com on 20 Jul 2012 at 1:56

Attachments: