The report build with JasperReports that contains QR Code failed to run at iDempiere 2.1

874 views Asked by At

Librabry addded in eclipseI wish to show the QR Code at report generated with JasperReports. I am using Jaspersoft Studio (JSS) 6.2.0 to generate the jrxml and using iDempiere [ ADEMPIERE_MAIN_VERSION=Release 2.1,ADEMPIERE_DB_VERSION=2014-10-31].

The jrxml contains this block for showong QR code:

<componentElement>
    <reportElement x="53" y="10" width="99" height="29"/>
        <jr:QRCode xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
            <jr:codeExpression><![CDATA[$F{qrcode}]]></jr:codeExpression>
        </jr:QRCode>
</componentElement>

The jrxml is working fine at JSS. Now I have attached it to invoice report and while opening that report in browser from iDempiere application, it throws following error in Eclipse.

I have also added following classes in Studio.

In Eclipse console I'm getting the following error:

Apr 21, 2022 3:43:22 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 1452 column 229: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:QRCode'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.
org.xml.sax.SAXParseException; lineNumber: 1452; columnNumber: 229; cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:QRCode'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1892)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:230)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:218)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:172)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:156)
at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:137)
at org.adempiere.report.jasper.ReportStarter.compileReport(ReportStarter.java:1350)
at org.adempiere.report.jasper.ReportStarter.processReport(ReportStarter.java:1212)
at org.adempiere.report.jasper.ReportStarter.startProcess0(ReportStarter.java:470)
at org.adempiere.report.jasper.ReportStarter.startProcess(ReportStarter.java:345)
at org.adempiere.util.ProcessUtil.startJavaProcess(ProcessUtil.java:172)
at org.compiere.apps.AbstractProcessCtl.startProcess(AbstractProcessCtl.java:466)
at org.compiere.apps.AbstractProcessCtl.run(AbstractProcessCtl.java:272)
at org.adempiere.webui.apps.WProcessCtl.process(WProcessCtl.java:170)

What cause this error and how to fix it?

1

There are 1 answers

0
Habib On

I had the same problem in oracle jdev. when I used old version of ZXing jar files (verson 2.2 for both zxing-core and zxing-javase), then the problem has solved