Jump to content
Changes to the Jaspersoft community edition download ×

subreport in Tomcat


2005 IR Help

Recommended Posts

By: hj1122 - hj1122

subreport in Tomcat

2004-10-26 02:48

Can anyone give me a sample of how to deploy a master report with several subreports in Tomcat webapps?

 

My codes are :

 

File rd = new File(application.getRealPath("")+"/reports/jreport_r03_1.jrxml");

File rds = new File(application.getRealPath("")+"/reports/jSubreport_r03_4.jrxml");

JasperReport report = JasperCompileManager.compileReport( rd.getPath() );

JasperReport subreport = JasperCompileManager.compileReport( rds.getPath() );

 

Map hm = new HashMap();

hm.put("jSubreport_r03_4", subreport);

hm.put("jreport_r03_1", report);

JasperPrint jpr = JasperFillManager.fillReport(jr, hm, conn);

 

But it still doesn't work? Please can anyone give me some hints?

 

 

 

 

 

By: hj1122 - hj1122

the error message is

2004-10-26 03:05

type Exception report

 

message

 

description The server encountered an internal error () that prevented it from fulfilling this request.

 

exception

 

javax.servlet.ServletException: Errors were encountered when compiling report expressions class file:

See error messages above.

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)

org.apache.jsp.viewApp3_005fr03_005f1_jsp._jspService(viewApp3_005fr03_005f1_jsp.java:387)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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

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

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

 

root cause

 

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:

See error messages above.

net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.compileReport(JRAbstractJavaCompiler.java:155)

net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:137)

net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:199)

net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:151)

org.apache.jsp.viewApp3_005fr03_005f1_jsp._jspService(viewApp3_005fr03_005f1_jsp.java:165)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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

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

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 

 

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.

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