B4J Question Desktop App with JasperLibrary - barcode problem

DarkoT

Member
Licensed User
Hi,
I created desktop application which should have possibility to print Delivery Notes. Report is made in Jasper report. If I start to print delivery note from B4J application (using Jasper library), it's working fine. But - when I put on delivery note bar code, I received in B4J error (in I reports from Jasper Studio this example working fine - as Preview).

java.lang.NoClassDefFoundError: net/sourceforge/barbecue/BarcodeException
at net.sf.jasperreports.components.barbecue.BarbecueFillComponent.setBarcodeImage(BarbecueFillComponent.java:142)
at net.sf.jasperreports.components.barbecue.BarbecueFillComponent.fill(BarbecueFillComponent.java:111)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.fill(JRFillComponentElement.java:198)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.fillElements(JRFillElementContainer.java:1039)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:469)
at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:428)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillBandNoOverflow(JRVerticalFiller.java:448)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageHeader(JRVerticalFiller.java:409)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:258)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:110)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:615)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:413)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:120)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:103)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:530)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:954)
at com.prusb.jasperrep.JasperReports.Print(JasperReports.java:314)
at b4j.example.main._btnmysql_action(main.java:141)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:216)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: net.sourceforge.barbecue.BarcodeException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 39 more
java.lang.RuntimeException: java.lang.NoClassDefFoundError: net/sourceforge/barbecue/BarcodeException
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:120)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:216)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
What is wrong? It's sound like here are missed barbeque fonts...
I can not find any smart info about how to add barcode fonts to Jasper report...

Some ideas?

Thank you, DaT
 

DonManfred

Expert
Licensed User
you are missing a dependency for net/sourceforge/barbecue
Forget to use #additionaljar for one (or more) jar files?
 
Upvote 0

DarkoT

Member
Licensed User
HOW should i know???

You are providing ZERO information about your app, your code, the used libraries.
Sorry for this... But - you give me right info about missing JAR; this need to be included into JXML as additional JAR and the system will run report...

Thank you for help...
DaT
 
Upvote 0
Top