views:

2173

answers:

2

I have my reports in reports\templates\Contractor_Bill.jrxml, reports\results\ which stores the results. It works fine in Netbeans 6.5. But when i copy the dist folder containing exec jar file to a new place n run the jar. It throws this execption. I also craeted the report folder in the new place. Still itz gvin same error. What might b the problem. Thnx in advance

Aug 5, 2009 10:11:58 PM cbs.ui.ReportUI GenerateReport SEVERE: null net.sf.jasperreports.engine.JRException: Error compiling report java source file s : C:\Documents and Settings\Mohanish Timble\Desktop\sw\Contractor_Bill_old_124 9490518017_973633.java at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJ avacCompiler.java:93) at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUni ts(JRAbstractClassCompiler.java:67) at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(J RAbstractCompiler.java:190) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(Jasper CompileManager.java:220) at net.sf.jasperreports.engine.JasperCompileManager.compileReport(Jasper CompileManager.java:153) at cbs.ui.ReportUI.GenerateReport(ReportUI.java:202) at cbs.ui.ReportUI.btnGenerateBillActionPerformed(ReportUI.java:151) at cbs.ui.ReportUI.access$100(ReportUI.java:38) at cbs.ui.ReportUI$2.actionPerformed(ReportUI.java:85) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour ce) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.io.IOException: Cannot run program "javac": CreateProcess error= 2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJ avacCompiler.java:62) ... 33 more Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th e file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 37 more Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java: 138) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57 ) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa nager.java:402) at cbs.ui.ReportUI.GenerateReport(ReportUI.java:218) at cbs.ui.ReportUI.btnGenerateBillActionPerformed(ReportUI.java:151) at cbs.ui.ReportUI.access$100(ReportUI.java:38) at cbs.ui.ReportUI$2.actionPerformed(ReportUI.java:85) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour ce) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

A: 

This could be the problem:

  Caused by: java.io.IOException: Cannot run program "javac"

The report is trying to invoke the Java compiler. Most likely, JasperReports is trying to compile a version of the document template (Contractor_Bill.jrxml) to .jasper format.

Try bundling the .jasper versions of your reports in the .jar file instead of the .jrxml versions.

Dave Jarvis
A: 

Include the Jar jasper-compiler-jdt in the lib folder

Rajeev