Compilation error: ireport with java; the 'uuid' attribute is not allowed to appear in the 'jasperReport' element

I work with ireport, but when I try to compile it with a java class, an error appears.

Exception in thread "main" net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'uuid' is not allowed to appear in element 'jasperReport'. at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:247) 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) 

thanks for your help:)

+1
source share
2 answers

This is a compatibility issue in iireport. when you are about to open .jrxml in an older version of ireport, the version you created before you get this error. To fix this, simply separate the uuid attribute and open it again in Irrita.

+1
source

This is because there is no uuid error in your jrxml file. If you use the ireport tool, you will not need to write the jrxml file yourself, you just need to add the bean properties as a file in this tool and specify its properties, and you will get automatically generated jrxml.

I can help you with reports on jasper, because I worked on it for several months in complex reports.

-one
source

Source: https://habr.com/ru/post/1014045/


All Articles