Hi, im using in the Jasperreport project, the version 6.18.1 of the library. Im trying to build table data from JSON, where i have the array data. I created in JasperReportStudio the report, and trying to fill the report with JSON data in the Java Application. Therefore i need the QLVariant of the DataSource like this:
JasperDesign design = JRXmlLoader.load(templateStream); // TEMPLATE JasperReport report = JasperCompileManager.compileReport(design); JsonQLDataSource dsql = new JsonQLDataSource(dataStream); // DATA JasperPrint jasperPrint = JasperFillManager.fillReport(report, parameters, dsql);
The ErrorMessage is this
java.lang.ClassNotFoundException: antlr.TokenStream, at java.base/java.net.URLClassLoader.findClass(Unknown Source) ~[na:na], at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na], at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151) ~[pdf-creator-restapi.jar:0.0.5], at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na], at net.sf.jasperreports.engine.data.JsonQLDataSource.<init>(JsonQLDataSource.java:117) ~[jasperreports-6.18.1.jar!/:6.18.1-9d75d1969e774d4f179fb3be8401e98a0e6d1611], at net.sf.jasperreports.engine.data.JsonQLDataSource.<init>(JsonQLDataSource.java:111) ~[jasperreports-6.18.1.jar!/:6.18.1-9d75d1969e774d4f179fb3be8401e98a0e6d1611], at net.sf.jasperreports.engine.data.JsonQLDataSource.<init>(JsonQLDataSource.java:95) ~[jasperreports-6.18.1.jar!/:6.18.1-9d75d1969e774d4f179fb3be8401e98a0e6d1611], at net.sf.jasperreports.engine.data.JsonQLDataSource.<init>(JsonQLDataSource.java:99) ~[jasperreports-6.18.1.jar!/:6.18.1-9d75d1969e774d4f179fb3be8401e98a0e6d1611],
When i use the normal JSONDataSource, and the report is using the JSONData parameters, i can fill the report with data (no the table data with subdatasource). Therefore i need the JSONQLDataSource. In the Jasperreport everything is working. The App is using the Java 11. In the pom.xml of the file i can see tha library
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</dependency>
Any help is appreciated. Thanx,
Hello,
following the same error encountered and after successfully deleting it with another dependencies (jpa & mysql),
this problem can be solved by changing the version to 2.7.2.