473,395 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

java compilation error

Hi guys,

I was trying to compile jasper report from java as below:

Expand|Select|Wrap|Line Numbers
  1.     public static void runReport(String databaseName, String userName,
  2.             String password, String reportFile) {
  3.         JasperReport jasperReport;
  4.         JasperPrint jasperPrint;
  5.         try {
  6.             jasperReport = JasperCompileManager
  7.                     .compileReport("C:\\ireport\\pidcif_user.jrxml");
  8.             jasperPrint = JasperFillManager.fillReport(jasperReport,
  9.                     new HashMap(), new JREmptyDataSource());
  10.             JasperExportManager.exportReportToPdfFile(jasperPrint,
  11.                     "C:\\ireport\\pidcif_user.pdf");
  12.         } catch (JRException e) {
  13.             e.printStackTrace();
  14.         }
  15.  
  16.     }
but what I got is the below error message:

Expand|Select|Wrap|Line Numbers
  1. net.sf.jasperreports.engine.JRException: Error compiling report java source files : C:\Apps\Tip40\JavaTest\pidcif32user_1198207904725_975332.java 
  2.     at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:93)
  3.     at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:67)
  4.     at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:190)
  5.     at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105)
  6.     at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212)
  7.     at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:145)
  8.     at ReportDriver.runReport(ReportDriver.java:81)
  9.     at ReportDriver.main(ReportDriver.java:109)
  10. Caused by: java.io.IOException: CreateProcess: javac -classpath "C:\Apps\Tip40\JavaTest;C:\Program Files\JasperSoft\iReport-2.0.0\lib\jasperreports-1.3.4.jar;C:\Program Files\JasperSoft\iReport-2.0.0\lib\commons-beanutils-1.7.jar;C:\Program Files\JasperSoft\iReport-2.0.0\lib\commons-collections-2.1.jar;C:\Program Files\JasperSoft\iReport-2.0.0\lib\commons-digester-1.7.jar;C:\Program Files\JasperSoft\iReport-2.0.0\lib\commons-dbcp-1.2.1.jar;C:\Program Files\JasperSoft\iReport-2.0.0\lib\commons-logging-1.0.2.jar;C:\Program Files\JasperSoft\iReport-2.0.0\lib\ojdbc14_g.jar" C:\Apps\Tip40\JavaTest\pidcif32user_1198207904725_975332.java error=2
  11.     at java.lang.ProcessImpl.create(Native Method)
  12.     at java.lang.ProcessImpl.<init>(Unknown Source)
  13.     at java.lang.ProcessImpl.start(Unknown Source)
  14.     at java.lang.ProcessBuilder.start(Unknown Source)
  15.     at java.lang.Runtime.exec(Unknown Source)
  16.     at java.lang.Runtime.exec(Unknown Source)
  17.     at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:62)
  18.     ... 7 more
Please help, Thanks !

regards,
Mark
Dec 21 '07 #1
0 1477

Sign in to post your reply or Sign up for a free account.

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
133
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
0
by: daniel li | last post by:
I got another convert issue. This is the same project as I posted yesterday, and received a perfect response. The conversion threw a SupportClass for me and one of the data type is...
0
by: dashprasannajit | last post by:
package djvusearching; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.lucene.analysis.cjk.CJKAnalyzer; //import...
23
by: Martin Pöpping | last post by:
Hello, I´m relatively new in programming with C#. I want to design a class with can only be used in the same namespace. So I declared this class as protected, but the compiler gives me the...
35
by: mwelsh1118 | last post by:
Why doesn't C# allow incremental compilation like Java? Specifically, in Java I can compile single .java files in isolation. The resulting individual .class files can be grouped into .jar files....
5
by: r035198x | last post by:
Setting up. Getting started To get started with java, one must download and install a version of Sun's JDK (Java Development Kit). The newest release at the time of writting this article is...
3
by: Ananthu | last post by:
Hi This is my codings in order to access mysql database from java. Codings: import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement;
1
by: mshroom12 | last post by:
Hello to all. I am having difficulty trying to do this Java project using Eclipse. The following is what I have to do. Election Day It's almost election day and the election officials need a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.