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:\JBuilder7\jakarta-tomcat-4.0.3\bin\Timesheet.java:4: Package dori.jasper.engine not found in import.
import dori.jasper.engine.*;
^
C:\JBuilder7\jakarta-tomcat-4.0.3\bin\Timesheet.java:5: Package dori.jasper.engine.fill not found in import.
import dori.jasper.engine.fill.*;
^
C:\JBuilder7\jakarta-tomcat-4.0.3\bin\Timesheet.java:17: Superclass JRCalculator of class Timesheet not found.
public class Timesheet extends JRCalculator
^
3 errors
My xml file is: D:\EBA\VER3\Reports\Timesheet.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
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:\JBuilder7\jakarta-tomcat-4.0.3\bin\Timesheet.java:4: Package dori.jasper.engine not found in import.
import dori.jasper.engine.*;
^
C:\JBuilder7\jakarta-tomcat-4.0.3\bin\Timesheet.java:5: Package dori.jasper.engine.fill not found in import.
import dori.jasper.engine.fill.*;
^
C:\JBuilder7\jakarta-tomcat-4.0.3\bin\Timesheet.java:17: Superclass JRCalculator of class Timesheet not found.
public class Timesheet extends JRCalculator
^
3 errors
My xml file is: D:\EBA\VER3\Reports\Timesheet.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
0 Answers:
No answers yet