如何在嵌入Jasper的Ne​​tbeans中制作一个胖子罐?

时间:2018-11-15 03:27:59

标签: java netbeans jasper-reports rxtx fatjar

我有一个使用RXTXComm和Jasper iReports的Java项目。当我从Netbeans将其构建到/ dist时,它与dist / lib文件夹一起正常工作。但是,当我将它变成一个胖(或超级)罐子时,它运行良好,并在Jasper报表创建过程中引发以下错误并冻结。

    java.util.logging.ErrorManager: 5
Handler.reportError caught:
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
        at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:110)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:69)
        at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57)
        at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:200)
        at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:215)
        at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:115)
        at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667)
        at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:983)
        at Views.SellingInvoice.printReport(SellingInvoice.java:1905)
        at Views.PaymentMethods.doSave(PaymentMethods.java:874)
        at Views.PaymentMethods.btn_payment_methods_saveActionPerformed(PaymentMethods.java:469)
        at Views.PaymentMethods.access$000(PaymentMethods.java:36)
        at Views.PaymentMethods$1.actionPerformed(PaymentMethods.java:144)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.Component.processMouseEvent(Component.java:6533)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
        at java.awt.Component.processEvent(Component.java:6298)
        at java.awt.Container.processEvent(Container.java:2236)
        at java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.awt.Container.dispatchEventImpl(Container.java:2294)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
        at java.awt.Container.dispatchEventImpl(Container.java:2280)
        at java.awt.Window.dispatchEventImpl(Window.java:2746)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.awt.EventQueue$4.run(EventQueue.java:729)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0"
Exception: net.sf.jasperreports.engine.JRRuntimeException thrown from the UncaughtExceptionHandler in thread "AWT-EventQueue-0"

为了便于记录,我将rxtx.dll与jar或exe一起使用,以便使该部分正常工作。我担心的是,只有胖子无法与Jasper一起使用。 感谢您的帮助。

0 个答案:

没有答案