2004 IR Help Posted August 20, 2006 Share Posted August 20, 2006 By: Oberonko - oberonko Error compiling report java source file 2005-03-22 07:49 Hi, i was searching here for any similar questions, but unfortunately nothing found, so pls help me, what is wrong...maybe i have not understood the system of JReports... Well, i ve created the XML file for JasperDesign, in the tag <jasperReport name="BasicReport" >, but i cant create from it the JasperReport - i cant compile it. The exception is : net.sf.jasperreports.engine.JRException: Error compiling report java source file : C:...SampleBasicReport.java. I dont have such java file, i dont understand why it wants to compile it. The XML is called BasicReport.xml. <b>Thnx</b> for any help. By: Denny Valliant - xenden RE: Error compiling report java source file 2005-03-22 11:09 Is your jrxml file called BasicReport.jrxml? I remember having some trouble when I named the report one thing but had the file saved as another... don't think it was the same problem you are having tho. Guess I'll echo and say "check out the samples", as that's really the bestest way to find out what is going on. Have Fun! By: Oberonko - oberonko RE: Error compiling report java source file 2005-03-23 05:30 Thanx,, for the answer maybe problem was in the ending of the file. well, now i have new exception : I ve downloaded form JasperReport Home Page one sample, only for compiling - MasterReport.jrxml This is what i have in the code JasperDesign jasperDesign = JasperManager.loadDesign("MasterReport.jrxml"); JasperReport jasperReport = JasperManager.compileReport(jasperDesign); and now the Exception is following : net.sf.jasperreports.engine.JRException: Error loading object from file : MasterReport.jrxml at net.sf.jasperreports.engine.util.JRLoader.loadObject(Unknown Source) at net.sf.jasperreports.engine.util.JRLoader.loadObject(Unknown Source) at net.sf.jasperreports.engine.JasperManager.loadDesign(Unknown Source) at basic2.main(basic2.java:65) Caused by: java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.<init>(Unknown Source) Any ideas, thanx a lot for any kind of help :-) Thanx xenden to you too :) By: Oberonko - oberonko RE: Error compiling report java source file 2005-03-23 08:25 Hi i was wrong ive used bad method for loading the jrxml, ive repaired it, but the first problem is still there : i ve downloaded the samples a tried on them but no success : jasperDesign = JasperManager.loadXmlDesign("MasterReport.jrxml"); Collection col = JasperCompileManager.verifyDesign(jasperDesign); jasperReport = JasperCompileManager.compileReport(jasperDesign); and error : net.sf.jasperreports.engine.JRException: Error compiling report java source file : C:...SampleMasterReport.java at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClass(Unknown Source) at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.compileReport(Unknown Source) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(Unknown Source) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(Unknown Source) at basic2.main(basic2.java:68) Link to comment Share on other sites More sharing options...
harshalsonar777 Posted June 30, 2020 Share Posted June 30, 2020 I have done some investigations into this question. that a fix is to include jdt-compiler.jar file in your Java Project Referenced Libraries.http://www.java2s.com/Code/Jar/j/Downloadjdtcompilerjar.htm this is the link where you can download the jdt-compiler.jar file. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now