By: Renardo Tyner - royalree
JasperReports Does Not Compile
2002-10-24 11:41
Hi,
I've added the code below to a startup class that gets run when the server starts up. I'm trying to run the code in both orion1.5.2 and Tomcat4.06. The JasperReports code does not work with either server. Please Help!
--code fragement--
System.setProperty("jasper.reports.compile.class.path", "C:\\\\JasperReports\\lib\\jasperreports.jar");
System.setProperty("jasper.reports.compile.temp", "C:\\temp\\templates");
System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
try{
JasperCompileManager.compileReportToFile("C:\\temp\\templates\\HyperlinkReport.xml");
System.out.println("Ran Fine!");
}catch (JRException jre){
System.out.println("Encountered Error Compiling JasperReports --> " + jre.getMessage() );
}catch (Exception e){
System.out.println("Encountered Error Compiling JasperReports --> " + e.getMessage() );
}
By: Jeremy Cowgar - coolpops
RE: JasperReports Does Not Compile
2002-10-24 12:50
What is the error you are recieving?
Jeremy Cowgar
By: Renardo Tyner - royalree
RE: JasperReports Does Not Compile
2002-10-24 13:17
I'm not receiving and error at all. It hangs when within the try/catch block.
By: Renardo Tyner - royalree
RE: JasperReports Does Not Compile
2002-10-24 13:30
I'm not receiving and error at all. It hangs when within the try/catch block.
By: Jeremy Cowgar - coolpops
RE: JasperReports Does Not Compile
2002-10-24 16:18
Does it work properly outside the servers?
By: Renardo Tyner - royalree
RE: JasperReports Does Not Compile
2002-10-25 09:06
Yes, it works properly outside the servers.
By: Jeremy Cowgar - coolpops
RE: JasperReports Does Not Compile
2002-10-25 14:49
I had a similar problem and it was due to class loaders. What I did, and I think it is a better idea (at least for me) is to not tie up the server compiling. Compile your .jasper files and deploy them onto the server. Then on your server just use JasperFillManager ...
I created a little utility to do that for me, I call it JasperCompiler. Now all report development is done and compiled on my desktop, then deployed into production.
Jeremy
By: J rgen Lundberg - jorgen99
RE: JasperReports Does Not Compile
2002-10-25 15:21
If you have problems with classloaders and jar-files you should read these two articles:
http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html
http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html
/ J rgen
JasperReports Does Not Compile
2002-10-24 11:41
Hi,
I've added the code below to a startup class that gets run when the server starts up. I'm trying to run the code in both orion1.5.2 and Tomcat4.06. The JasperReports code does not work with either server. Please Help!
--code fragement--
System.setProperty("jasper.reports.compile.class.path", "C:\\\\JasperReports\\lib\\jasperreports.jar");
System.setProperty("jasper.reports.compile.temp", "C:\\temp\\templates");
System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
try{
JasperCompileManager.compileReportToFile("C:\\temp\\templates\\HyperlinkReport.xml");
System.out.println("Ran Fine!");
}catch (JRException jre){
System.out.println("Encountered Error Compiling JasperReports --> " + jre.getMessage() );
}catch (Exception e){
System.out.println("Encountered Error Compiling JasperReports --> " + e.getMessage() );
}
By: Jeremy Cowgar - coolpops
RE: JasperReports Does Not Compile
2002-10-24 12:50
What is the error you are recieving?
Jeremy Cowgar
By: Renardo Tyner - royalree
RE: JasperReports Does Not Compile
2002-10-24 13:17
I'm not receiving and error at all. It hangs when within the try/catch block.
By: Renardo Tyner - royalree
RE: JasperReports Does Not Compile
2002-10-24 13:30
I'm not receiving and error at all. It hangs when within the try/catch block.
By: Jeremy Cowgar - coolpops
RE: JasperReports Does Not Compile
2002-10-24 16:18
Does it work properly outside the servers?
By: Renardo Tyner - royalree
RE: JasperReports Does Not Compile
2002-10-25 09:06
Yes, it works properly outside the servers.
By: Jeremy Cowgar - coolpops
RE: JasperReports Does Not Compile
2002-10-25 14:49
I had a similar problem and it was due to class loaders. What I did, and I think it is a better idea (at least for me) is to not tie up the server compiling. Compile your .jasper files and deploy them onto the server. Then on your server just use JasperFillManager ...
I created a little utility to do that for me, I call it JasperCompiler. Now all report development is done and compiled on my desktop, then deployed into production.
Jeremy
By: J rgen Lundberg - jorgen99
RE: JasperReports Does Not Compile
2002-10-25 15:21
If you have problems with classloaders and jar-files you should read these two articles:
http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html
http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html
/ J rgen
0 Answers:
No answers yet