How to make a fat jar in Netbeans embedding Jasper?










0















I have a java project that uses RXTXComm and Jasper iReports. When I build it to /dist from Netbeans it works fine along with the dist/lib folder. But when I make it a fat (or uber) jar it runs well and throws the following error on Jasper report creation and freezes.



 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"


For the record I use rxtx.dll along with the jar or exe so that part works fine. What I'm worried is how only fat jar is not working with Jasper.
I appreciate your help.










share|improve this question






















  • You can use Maven or Gradle for example. The fat jar is working fine

    – Alex K
    Nov 15 '18 at 17:45
















0















I have a java project that uses RXTXComm and Jasper iReports. When I build it to /dist from Netbeans it works fine along with the dist/lib folder. But when I make it a fat (or uber) jar it runs well and throws the following error on Jasper report creation and freezes.



 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"


For the record I use rxtx.dll along with the jar or exe so that part works fine. What I'm worried is how only fat jar is not working with Jasper.
I appreciate your help.










share|improve this question






















  • You can use Maven or Gradle for example. The fat jar is working fine

    – Alex K
    Nov 15 '18 at 17:45














0












0








0








I have a java project that uses RXTXComm and Jasper iReports. When I build it to /dist from Netbeans it works fine along with the dist/lib folder. But when I make it a fat (or uber) jar it runs well and throws the following error on Jasper report creation and freezes.



 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"


For the record I use rxtx.dll along with the jar or exe so that part works fine. What I'm worried is how only fat jar is not working with Jasper.
I appreciate your help.










share|improve this question














I have a java project that uses RXTXComm and Jasper iReports. When I build it to /dist from Netbeans it works fine along with the dist/lib folder. But when I make it a fat (or uber) jar it runs well and throws the following error on Jasper report creation and freezes.



 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"


For the record I use rxtx.dll along with the jar or exe so that part works fine. What I'm worried is how only fat jar is not working with Jasper.
I appreciate your help.







java netbeans jasper-reports rxtx fatjar






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 3:27









Ryan38Ryan38

1




1












  • You can use Maven or Gradle for example. The fat jar is working fine

    – Alex K
    Nov 15 '18 at 17:45


















  • You can use Maven or Gradle for example. The fat jar is working fine

    – Alex K
    Nov 15 '18 at 17:45

















You can use Maven or Gradle for example. The fat jar is working fine

– Alex K
Nov 15 '18 at 17:45






You can use Maven or Gradle for example. The fat jar is working fine

– Alex K
Nov 15 '18 at 17:45













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311997%2fhow-to-make-a-fat-jar-in-netbeans-embedding-jasper%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311997%2fhow-to-make-a-fat-jar-in-netbeans-embedding-jasper%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

Syphilis

Darth Vader #20