Jump to content
Changes to the Jaspersoft community edition download ×

Error w/ Servlet


Recommended Posts

By: Tam Nguyen Anh - tamnguyen

Error w/ Servlet

2003-01-28 20:21

Hi all,

I build an application and compile my xml files to pdf files correctly. But when I devenlope a servlet and use JR, I can't compile those files. Although I did add the jasperreports-0.4.4.jar into my 'WEB-INF/lib' and 'jakarta-tomcat-4.0.3/lib' folders, I still got those errors:

 

dori.jasper.engine.JRException: Errors were encountered when compiling report design:

C:JBuilder7jakarta-tomcat-4.0.3binTimesheet.java:4: Package dori.jasper.engine not found in import.

import dori.jasper.engine.*;

^

C:JBuilder7jakarta-tomcat-4.0.3binTimesheet.java:5: Package dori.jasper.engine.fill not found in import.

import dori.jasper.engine.fill.*;

^

C:JBuilder7jakarta-tomcat-4.0.3binTimesheet.java:17: Superclass JRCalculator of class Timesheet not found.

public class Timesheet extends JRCalculator

^

3 errors

 

My xml file is: D:EBAVER3ReportsTimesheet.xml

 

Anyone helps me?

 

 

 

 

By: Tam Nguyen Anh - tamnguyen

RE: Error w/ Servlet

2003-01-29 23:38

I solve my problem myself. It was just because I forgot setting those propeties in my servlet:

 

System.setProperty(

"jasper.reports.compile.class.path",

context.getRealPath("/WEB-INF/lib/jasperreports.jar") +

System.getProperty("path.separator") +

context.getRealPath("/WEB-INF/classes/")

);

 

System.setProperty(

"jasper.reports.compile.temp",

context.getRealPath("/reports/")

);

String oldSaxDriver = System.setProperty(

"org.xml.sax.driver",

"org.apache.xerces.parsers.SAXParser"

);

Tam

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