Jump to content
Changes to the Jaspersoft community edition download ×

org.apache.jasper.JasperException


2005 IR Help

Recommended Posts

By: Martyn - mhk2c

org.apache.jasper.JasperException

2004-10-11 00:17

I am trying to compile a report realtime in a jsp file but I keep getting this problem I am using tomcat 4.1.24.

 

org.apache.jasper.JasperException: org/apache/commons/digester/Digester

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

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 com.Key2Contact.clientwebsite.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:147)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)

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:2415)

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.authenticator.SingleSignOn.invoke(SingleSignOn.java:376)

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:594)

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)

 

The problem is that it doesnt say at which line the error occures. I have downloaded the advised digestor from the tomcat site and added the lib file to my webapps/ROOT/WEB-INF/lib/ directory. This creates the same error. Overriding the digestor jar file in the tomcat dir stops tomcat from working. It wont even start!!! I returned the original tomcat digestor jar file back to the common/lib directory and tomcat worked again.

 

This is my code

 

String connectionURL = "jdbc:mysql://localhost:3306/Db";

String userName = "username";

String password = "password";

 

Class.forName("com.mysql.jdbc.Driver");

java.sql.Connection aConnection = java.sql.DriverManager.getConnection(connectionURL, userName, password);

 

File reportFile = new File(application.getRealPath("/BasicReport.xml"));

 

// First, load JasperDesign from XML and compile it into JasperReport

JasperDesign jasperDesign = JasperManager.loadXmlDesign(reportFile.getAbsolutePath());

JasperReport jasperReport = JasperManager.compileReport(jasperDesign);

 

// Second, create a map of parameters to pass to the report.

Map parameters = new HashMap();

parameters.put("ReportTitle", "Basic JasperReport");

parameters.put("MaxSalary", new Double(25000.00));

 

// Fourth, create JasperPrint using fillReport() method

JasperPrint jasperPrint = JasperManager.fillReport(jasperReport, parameters, aConnection);

 

// You can use JasperPrint to create PDF

JasperManager.printReportToPdfFile(jasperPrint, "BasicReport.pdf");

 

// Or to view report in the JasperViewer

JasperViewer.viewReport(jasperPrint);

 

Can anybody help?

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