Jasper reports plugin and Barcode4j QR code

Questions and answers on developing, deploying and using plugins and JavaBeans

Jasper reports plugin and Barcode4j QR code

Postby lwjwillemsen » Thu Feb 17, 2022 1:18 pm

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!
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Jasper reports plugin and Barcode4j QR code

Postby stefaniacolombara » Sat Feb 10, 2024 3:46 pm

Hello,

did you solve it?

I have same issue.
stefaniacolombara
 
Posts: 40
Joined: Mon Feb 06, 2012 11:19 am

Re: Jasper reports plugin and Barcode4j QR code

Postby murmi » Sat Feb 10, 2024 4:28 pm

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?
Fritz Maurhofer
Maurhofer Informatik AG
CH-8340 Hinwil
murmi
 
Posts: 41
Joined: Thu Jul 22, 2010 5:10 pm

Re: Jasper reports plugin and Barcode4j QR code

Postby stefaniacolombara » Sat Feb 10, 2024 4:51 pm

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
stefaniacolombara
 
Posts: 40
Joined: Mon Feb 06, 2012 11:19 am

Re: Jasper reports plugin and Barcode4j QR code

Postby lwjwillemsen » Mon Feb 12, 2024 10:38 am

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.
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 2 guests