首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法运行Jasper报告:系统找不到指定的文件

无法运行Jasper报告:系统找不到指定的文件
EN

Stack Overflow用户
提问于 2009-08-08 07:23:04
回答 2查看 11.2K关注 0票数 5

我有reports\templates\Contractor_Bill.jrxml格式的报告和reports\results\格式的结果。它在NetBeans6.5中运行得很好,但是当我将包含exec jar文件的dist文件夹复制到一个新位置并运行jar时,它抛出了这个异常。

我还在新位置创建了报告文件夹,但它仍然生成相同的异常。

代码语言:javascript
复制
Aug 5, 2009 10:11:58 PM cbs.ui.ReportUI GenerateReport
SEVERE: null
net.sf.jasperreports.engine.JRException: Error compiling report java source files : C:\Documents and Settings\Mohanish Timble\Desktop\sw\Contractor_Bill_old_1249490518017_973633.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.JasperCompileManager.compileReport(JasperCompileManager.java:220)
        at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.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 Source)
        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(JRJavacCompiler.java:62)
        ... 33 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(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(JasperFillManager.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 Source)
        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)
EN

回答 2

Stack Overflow用户

发布于 2009-10-24 20:01:59

在lib文件夹中包含Jar jasper-compiler-jdt

票数 5
EN

Stack Overflow用户

发布于 2019-08-30 20:58:01

jasper-reports >= 6.0.0版本的

,用于编译的jar称为

代码语言:javascript
复制
ecj-x.x.x.jar

有关jasper报告的相对版本,请参阅maven repo以获取正确的ecj版本号。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1248237

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档