Jasper Reports problem

Hi,
I have just begun to use Jasper Reports, and I am trying to load a sample JR xml file into a jsp in my web application.
report.jsp
<%@ page
   import="java.io.*,
           java.util.*,
           java.sql.Connection,
           javax.sql.DataSource,
           javax.naming.InitialContext,
           net.sf.jasperreports.engine.*,
           net.sf.jasperreports.engine.design.JasperDesign,
           net.sf.jasperreports.engine.xml.JRXmlLoader,
           net.sf.jasperreports.engine.export.*"
%><%@page import="com.energyts.ebench.*"
%><%@page import="com.energyts.db.*"
%><%@page import="java.sql.ResultSet"
%>
<%
     out.println("Attempting to create Jasper report");
     try{
     // read in xml design
     InputStream input = new FileInputStream(new File("c:\\Tomcat 5.5\\webapps\\eBench\\report.xml"));
     JasperDesign design = JRXmlLoader.load(input);
     // compile design
     JasperReport report = JasperCompileManager.compileReport(design);
     // Database connection
     Statement statement = EbenchUtils.getStatement(session);
     JasperPrint print
    = JasperFillManager.fillReport(report, new HashMap(), statement.getConnection());
       JasperExportManager.exportReportToPdfFile(
                 print, "reports/simple_report.pdf");
     }catch (JRException e){
          out.println("failed");
          e.printStackTrace();
%>I am using Tomcat 5.5 and JasperReports 2.04
I am getting this error:
HTTP Status 404 - reports\report.xml (The system cannot find the path specified)
type Status report
message reports\report.xml (The system cannot find the path specified)
description The requested resource (.\reports\report.xml (The system cannot find the path specified)) is not available.
Is the way I declare my path not declared correctly (the file is in the directory)? do the Tomcat settings need to be changed for this to work?
Any suggestions
Thanks
J

I learned that my mistake was that I am not using the .jasper file. I have a new error now although I already put the needed file inside the classes folder. This is the error:
java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.fill.JRVerticalFiller
     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)
     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:582)
     at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:368)
     at EmptyDSReportServlet.doGet(EmptyDSReportServlet.java:25)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
     at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
     at com.caucho.server.http.Invocation.service(Invocation.java:315)
     at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
     at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:253)
     at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
     at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
     at java.lang.Thread.run(Thread.java:619)

Similar Messages

  • 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

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

  • Who is creating general forum topics _? i wanna jasper reports topic ...

    who is creating general forum topics like
    Developers Home > Developer Forums > Java Forums > Enterprise & Distributed Computing > Web Applications > JavaServer Pages (JSP) and JSTL >
    i have troubles with jasper reports . but i solved lots of them . this site is great , but i can not find jasper reports topics easily . i help where i find a jasper reports problem as i can help . but when i need help about it , i am creating topics like here . and normally , here are not much answers for me , because the general topics is " jsp and jstl " .
    i hope i could tell my problem with topics ; i hope someone helps me about it ...

    who is creating general forum topics like
    Developers Home > Developer Forums > Java Forums > Enterprise & Distributed Computing > Web Applications > JavaServer Pages (JSP) and JSTL >
    i have troubles with jasper reports . but i solved lots of them . this site is great , but i can not find jasper reports topics easily . i help where i find a jasper reports problem as i can help . but when i need help about it , i am creating topics like here . and normally , here are not much answers for me , because the general topics is " jsp and jstl " .
    i hope i could tell my problem with topics ; i hope someone helps me about it ...

  • 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

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

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

  • Date problem with jasper reports

    I need to pass the date values as a parameter to the jasper reports and process it in the report, how can achieve it please give me a brief explanation, i need the date value for processing a sql statement in the jasper report please help me a sample code
    from=first date value;
    to=second date value;
    //i need to pass the date  as the parameter how can i achieve it
          HashMap hm = new HashMap();
           hm.put("fromdate", from);
           hm.put("todate", to);
      JasperPrint jasperPrint;
                        jasperPrint = JasperFillManager.fillReport("W:/ReportWorks/Estimation Reports/Dailyreport ItemWise.jasper",hm, con);
                        JasperViewer.viewReport(jasperPrint,false); 

    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

  • 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

  • Open Jasper Report in new page using servlet

    Guys,
    Looks very simple but i am having problem making this process work. I am using 11.1.1.4
    This is my use case:
    - From a employee page, user clicks on a menu item to open report for current employee. I need to pass appropriate report parameters to servlet and open report into new page.
    I can successfully call servlet using commandmenuitem and set request parameters and call servlet from backing bean.... but that doesn't open report in a new page.... any way i can do this?
    Another option i tried was that using gomenuitem and setting target=blank but in that case i need to pass the parameter using servlet url which i like to avoid.(in case i need to pass many parameters in future) (also values will be set on page so i need to generate url when then click the menuitem...... so there are some hoops and loops i need to go through) I don't know a way to pass the request parameter using backing bean to servlet... i don't think it is possible.
    Those are the two approaches i tried.
    If you have any better approach...I would appreciate if you can let me know. (i have searched on internet for two days now.... for the solution)
    -R
    Edited by: polo on Dec 13, 2011 7:22 AM

    Hi,
    Hope following will useful
    http://sameh-nassar.blogspot.com/2009/10/using-jasper-reports-with-jdeveloper.html
    http://www.gebs.ro/blog/oracle/jasper-reports-in-adf/

Maybe you are looking for

  • Live updating smart playlists not actually updating

    Apparently, this was a common complaint back in 2007. Well, I am still having this problem. iPhone 4, iOS 4.3.3 I have a static playlist filled with music called "MUSIC". I have a smart playlist "DYNAMIC" that references "MUSIC", which filters only s

  • Quicktime only downloaded a bit of the trailer

    When I tried to view a quicktime trailer, example: a HD 480p(36MB) trailer, it could only download the first 8 secs. When I try to view the trailer smaller in size, example standard medium, it could download 27 secs. And when I try to view standard s

  • Motion Detection on WVC80N - not working

    I've got the WVC80N camera setup on wired ethernet and everything is working fine with the exception of Motion Detection alerts. I've updated the firmware to the latest Ver.1.0.01 I can get test emails from the camera without any issues so I know tha

  • Photo sync problem...too many, and copied.

    Hi,my 1st post....having a problem with my 3gs with the photos and not sure it is fixable...here goes.. On itunes, click on my phone..over to photos....says "sync photos from"...then tick in the box "pictures"... Box underneath with all the folders..

  • Running Multiple ODI Agents On The Same Server

    Is it possible to run multiple ODI Scheduler Agents simultaneously on the same Server? As we provide Work repository name in ODI params file and if we have different work repository and we want to run schedular agent on same server how can we point t