alex171183 Posted July 20, 2007 Share Posted July 20, 2007 Hi! I'm trying to build a simple report but for sone reason I can't figure out it doesn't work. The java code is as following: Map parameters = new HashMap(); parameters.put("Title", "The Report"); JasperDesign jasperDesign = JRXmlLoader.load("C:/Documents and Settings/arey/QReport/src/qreport/classic1.jrxml"); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(coleccion); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters); JasperViewer visor = new JasperViewer(jasperPrint,false); visor.setVisible(true); where collection is a java.util.List filled with objects from a HQL Query. The exception thrown is this: net.sf.jasperreports.engine.JRException: Error compiling report java source files : C:Documents and SettingsareyQReportclassic_1184937081238_179238.java at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:93) at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:67) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:190) at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:105) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212) at qreport.Prueba.main(Prueba.java:43)Caused by: java.io.IOException: CreateProcess: javac -classpath "...†at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) at java.lang.ProcessImpl.start(ProcessImpl.java:30) at java.lang.ProcessBuilder.start(ProcessBuilder.java:451) at java.lang.Runtime.exec(Runtime.java:591) at java.lang.Runtime.exec(Runtime.java:464) at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:62) My jrxml is attached. I hope you could help me with this. Thanks in advance! [file name=classic1.jrxml size=7465]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/classic1.jrxml[/file] Link to comment Share on other sites More sharing options...
lucianc Posted July 20, 2007 Share Posted July 20, 2007 Include the jdt-compiler jar shipped with JR on your application classpath so that the JDT report compiler is used. HTH,Lucian 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