Page 1 of 1

Jasper reports plugin and Barcode4j QR code

PostPosted: Thu Feb 17, 2022 1:18 pm
by lwjwillemsen
I am trying to generate a Barcode4j QR Code from a Jasper report through the Jasper report plugin.
I am getting an error "java.lang.NoClassDefFoundError: com/google/zxing/WriterException", issued this error on https://github.com/Servoy/servoy_jasperreports/issues one year ago, no response until now.

No problem when report runs from JasperSoft Studio, I guess the needed library is not present in the Jasper report plugin.

Any help is very appreciated!

Re: Jasper reports plugin and Barcode4j QR code

PostPosted: Sat Feb 10, 2024 3:46 pm
by stefaniacolombara
Hello,

did you solve it?

I have same issue.

Re: Jasper reports plugin and Barcode4j QR code

PostPosted: Sat Feb 10, 2024 4:28 pm
by murmi
lwjwillemsen wrote:I am trying to generate a Barcode4j QR Code from a Jasper report through the Jasper report plugin.
I am getting an error "java.lang.NoClassDefFoundError: com/google/zxing/WriterException", issued this error on https://github.com/Servoy/servoy_jasperreports/issues one year ago, no response until now.

No problem when report runs from JasperSoft Studio, I guess the needed library is not present in the Jasper report plugin.

Any help is very appreciated!


Hi
We are producing QR-Codes with the jasperreports-6.4.1.jar plugin and in the plugins\servoy_jasperreports\ directory there is a file barcode4j-2.1.jar. Maybe this one is missing?

Re: Jasper reports plugin and Barcode4j QR code

PostPosted: Sat Feb 10, 2024 4:51 pm
by stefaniacolombara
Hi,

This is how we solve it:

1. added javase-3.3.1.jar and core-3.3.1,jar plugins into plugins/servoy_jasperreports folder
2. added the following line of code in servoy_jasperreports.jar.jnlp file ( you can find it in the plugins folder)
<jar href="/plugins/servoy_jasperreports/core-3.3.1.jar" download="lazy" version="3.3.1"/>
<jar href="/plugins/servoy_jasperreports/javase-3.3.1.jar" download="lazy" version="3.3.1"/>
3. added the following line of code in the plugins.properties file
servoy_jasperreports/core-3.3.1.jar=1637773803110:545396
servoy_jasperreports/javase-3.3.1.jar=1637773812071:41688
4. Restarted tomcat and the application server.


And yes, we need also the barcode4j-2.1.jar file as murmi said.
Hope it helps

Re: Jasper reports plugin and Barcode4j QR code

PostPosted: Mon Feb 12, 2024 10:38 am
by lwjwillemsen
Hi,

I placed the zxing jar file in the servoy_jasperreports directory and added the following lines to the servoy_jasperreports.jar.jnlp :

<jar href="/plugins/servoy_jasperreports/zxing-core-3.4.1.jar" download="lazy" part="zxing" version="3.4.1"/> <package name="com.google.zxing.*" part="zxing" recursive="true"/>

It's a pity that the zxing is not included the the Barcode Jasperreports build.