Error at idempiere(release 5.1) side while adding QR code into jasper report.

103 views
Skip to first unread message

Niraj Mangukiya

unread,
Sep 19, 2023, 8:48:34 AM9/19/23
to iDempiere
Hello Everyone,

I have created a Jasper Report and added QR code into it. But as I tested that Report in Japsersoft Studio 6.8 & 6.20 , it works fine but at idempiere (Release Number 5.1) side I am getting  below error while printing that report

Error (Attached img 'Error')
"loader constraint violation in interface itable initialization: when resolving method "org.apache.batik.dom.AbstractDocument.createEvent(Ljava/lang/String;)Lorg/w3c/dom/events/Event;"
the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/apache/batik/anim/dom/SVGOMDocument,
and the class loader (instance of <bootloader>) for interface org/w3c/dom/events/DocumentEvent have different Class objects for the type org/w3c/dom/events/Event used in the signature".

Without QR, report works fine.

Does anyone have any idea about this? If any then please share your valuable solution.

Thanks and Regards,
Niraj M.
Output of Jasper Report.png
Jasper Design.png
Error.png

Jesús Castillo

unread,
Sep 19, 2023, 9:03:32 AM9/19/23
to idem...@googlegroups.com

 Hi, if you are using Jasper Report, you can run your report with an old version of jasper. Try that first to see if your report runs in the 5.1 version.

Atte: Jesus Castillo.

Mailtrack Remitente notificado con
Mailtrack
09/19/23, 09:01:32 AM

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/93fe6fe0-daa5-47ed-bdcd-ee5077818d79n%40googlegroups.com.

Niraj Mangukiya

unread,
Sep 19, 2023, 11:17:07 AM9/19/23
to iDempiere
Hi,

I have tried to run my report in jasperSoft 5.5.1 version and I got compilation error related to QR code.

Regards,
Niraj M.
QR_in_JS551.png

mao...@gmail.com

unread,
Sep 19, 2023, 1:41:29 PM9/19/23
to iDempiere
Hi Niraj, I'm still using iDempiere 5.1 and i have reports with QR codes, but i use a container to generate the image of QR code.


In the image image expression use "http://<IPaddress>:<port>/?data="+$F{qrcode}.replaceAll( " ", "" ).replaceAll("=","%3D").replaceAll(":","%3A").replaceAll("/","%2F").replaceAll("&","%26")+"&size=350"

If you need use other type of barcodes, you can use this container: https://github.com/padiazg/barcode-generator

I hope you find it useful.

Nice day.

Niraj Mangukiya

unread,
Sep 20, 2023, 7:20:23 AM9/20/23
to iDempiere
Hi, 
Thanks for the solution.

I have tried to add QR with use of Image by adding image Expression
 "com.google.zxing.client.j2se.MatrixToImageWriter.toBufferedImage(
    new com.google.zxing.qrcode.QRCodeWriter().encode(
        $F{url},
        com.google.zxing.BarcodeFormat.QR_CODE, 300, 300
    )
)"

for this too am getting report printed correctly in Jaspersoft but not in idempiere. In idempiere I have added jar files (ZXing Java SE 3.3.1.jar &  ZXing Core 3.3.1)

I am looking for solution in idempiere for Error. Is it issue of missing jars?

Regards,
Niraj M.

mao...@gmail.com

unread,
Sep 20, 2023, 5:05:33 PM9/20/23
to iDempiere
Hi, Niraj

In my implementation, i add the zXing Library to create the image of QRCode and be stored in a image object,  but i never try to execute the libraries from jasper report, i try to access the image data in data base in SQL and then use in image field in jasper reports, but never can do it work.

The access from URL is fast to implement and you can edit always from the report

For the container solution, i use Portainer to manage the docker containers graphicaly, but you can run directly from docker in console.

Best Regards

Miguel Orea

Reply all
Reply to author
Forward
0 new messages