Jump to content
Changes to the Jaspersoft community edition download ×

Error in run time ( jasper reports)


Recommended Posts

By: smehta - smehta

Error in run time ( jasper reports)

2003-12-19 06:59

Hi there,

 

I need urgent help !!

I have successfully compiled and run jasper reports on one linux machine and it is working fine.

 

I have copied all the files to other linux machine and did everything same like putting jar files in classpath in WEB-INF and even i compiled the reports but when it converts to the pdf it is giving errors. The errors are at bottom.

The source code is here

 

File reportFile = new File(application.getRealPath("/reports/QueryReport.jasper"));

String ordNumber=request.getParameter("ORDER_NUM");

Map parameters = new HashMap();

parameters.put("ReportTitle", "Order Details Report");

parameters.put("ORDER_NUM", ordNumber);

parameters.put("SUBREPORT_PATH", application.getRealPath("/reports/QuerySubReport.jasper"));

parameters.put("SUBREPORT_QUOTE_PATH", application.getRealPath("/reports/QuerySubReportQuote.jasper"));

parameters.put("SUBREPORT_MOCKUP_PATH", application.getRealPath("/reports/QuerySubReportMockup.jasper"));

parameters.put("IMAGE_PATH", application.getRealPath("/images/"));

 

----------------------- Error is here

byte[] bytes =

JasperRunManager.runReportToPdf(

reportFile.getPath(),

parameters,

getConnection()

);

 

response.setContentType("application/pdf");

response.setContentLength(bytes.length);

ServletOutputStream ouputStream = response.getOutputStream();

 

 

 

JasperReports encountered this error :

java.lang.NoClassDefFoundError

at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:110)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:219)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:159)

at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:165)

at org.apache.jsp.pdf_jsp._jspService(pdf_jsp.java:88)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

 

 

 

 

 

 

By: Chuck Deal - cdeal

RE: Error in run time ( jasper reports)

2003-12-19 08:16

That doesn't look like the full stack trace. Was there more to it?

 

 

 

 

By: smehta - smehta

RE: Error in run time ( jasper reports)

2003-12-19 08:18

java.lang.NoClassDefFoundError

at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:110)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:219)

at org.apache.jsp.html_jsp._jspService(html_jsp.java:104)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

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.valves.CertificatesValve.invoke(CertificatesValve.java:246)

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.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.valves.AccessLogValve.invoke(AccessLogValve.java:577)

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.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)

at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)

at java.lang.Thread.run(Thread.java:536)

 

 

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Error in run time ( jasper reports)

2003-12-19 08:29

 

Hi,

 

You need X-server or Xvfb or PJA or JDK1.4 with

-Djava.awt.headless=true

 

I hope this helps.

Teodor

 

 

 

 

 

By: smehta - smehta

RE: Error in run time ( jasper reports)

2003-12-19 10:11

I am sorry - it works fine on Linux but not in Solaris 8.

 

Java version we using on both linux and solris - j2sdk1.4.1_02

Tomcat webserver - jakarta-tomcat-4.1.27

 

 

With above solution- what i did is

 

on solaris I wrote

1. export CATALINA_OPTS="-Djava.awt.headless=true"

2. ./shutdown.sh

3. ./startup.sh

 

now no error but you have choice of open,save,cancel,more info and if you click open

 

1. it opens microsoft word pad with

%PDF-1.4

%ࡢ㦮bsp;

5 0 obj

<</Filter /FlateDecode

/Length 126

>>

stream

x?3R𢲦nbsp;

á²”0 ..................................

(I DIDNOT POST ALL INFO HERE - PLEASE LET ME KNOW IF YOU NEED MORE OF INFO OF GENREATED PDF IN WORD FORMAT).

 

2. if you click save - it saves the file with pdf but when you open that saved pdf file you get an error message "There was an error openeing this document. This file cannot be openend because it has no pages".

 

 

HELP !!!!!!!!!!1

 

 

 

 

 

By: smehta - smehta

RE: Error in run time ( jasper reports)

2003-12-19 10:29

Well, i was using acrobat version as 5.0 then i got above

error ( it saved to word) but for acrobat version 5.1 it works fine. IT GENERATES REPORTS ONLY FOR -NO IMAGE DATA.

 

if i have a image in database and i want that image in reprot in pdf i got these problems --

 

JasperReports encountered this error :

 

java.io.IOException: java.awt.Image fetch aborted or errored

at com.lowagie.text.Image.getInstance(Unknown Source)

at com.lowagie.text.Image.getInstance(Unknown Source)

at

dori.jasper.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:980)

at

dori.jasper.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:386)

at

dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:339)

at

dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:228)

at

dori.jasper.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:187)

at

dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:167)

at org.apache.jsp.pdf_jsp._jspService(pdf_jsp.java:92)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)

at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

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.valves.CertificatesValve.invoke(CertificatesValve.java:246)

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.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.valves.AccessLogValve.invoke(AccessLogValve.java:577)

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.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)

at

org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)

at java.lang.Thread.run(Thread.java:536)

 

NESTED BY :

dori.jasper.engine.JRException: Error generating PDF report : QueryReport

at

dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:352)

at

dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:228)

at

dori.jasper.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:187)

at

dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:167)

at org.apache.jsp.pdf_jsp._jspService(pdf_jsp.java:92)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)

at

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)

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.valves.CertificatesValve.invoke(CertificatesValve.java:246)

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.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.valves.AccessLogValve.invoke(AccessLogValve.java:577)

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.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040)

at

org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151)

at java.lang.Thread.run(Thread.java:536)

Caused by: java.io.IOException: java.awt.Image fetch aborted or errored

at com.lowagie.text.Image.getInstance(Unknown Source)

at com.lowagie.text.Image.getInstance(Unknown Source)

at

dori.jasper.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:980)

at

dori.jasper.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:386)

at

dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:339)

... 40 more

 

 

 

 

 

 

 

By: smehta - smehta

RE: Error in run time ( jasper reports)

2003-12-19 11:10

I reasearched and found - it is not handling .bmp images but do handle .gif and .jpg.

 

Any help how to handle .bmp images. - the above error appear when the reports has .bmp images instead of .gif images

 

 

 

 

 

 

By: Chuck Deal - cdeal

RE: Error in run time ( jasper reports)

2003-12-19 11:35

You may have to find some Java package that will let you use .bmp files.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...