Downloaded iReport-4.6.0 for Linux and when creating a new report via the File->New... menu, the new report is not shown in the preview, but the error message cvc-complex-type.3.2.2 attribute 'uuid' is not allowed to appear in element 'jasperreport'
instead.
The same error message happens even when choosing compatibility 4.5.0 in the options.
The same error message happens also when opening a report file that was being produced by other users of iReport-4.6.0 (Windows).
The report files have their schema to http://jasperreports.sourceforge.net/xsd/jasperreport.xsd
, but this schema file doesn't mention any uuid
.
What could be the problem?
I found an answer:
I opened the JRXML file with notepad++ and did a "Search and Replace" of uuid="\w*-\w*-\w*-\w*-\w*"
, and selected REGULAR EXPRESSION, with empty string then all the occurrences of this wrong tag were removed.
Worked for me.
In iReport Designer, in the options window you can change compatibility mode to the version you prefer.
For me if I put compatibility to jasperreport 3.5.1, when I save the report again, the uuid are all removed.
Regards
Open report in the notpad++ and just only remove uuid and it's number.. After You will compile proper and generate report.... I have same problem and I solveby this way..
I do not use Linux .But you create report use iReport Designer-xx. You add Same version jasperreport(jasperreport-XX) jar in your project.
I just suggested my coworker who also run into the problem this:
sed -i 's/ uuid="[^"]*"//g' $(find * -name \*.jrxml)
I don’t normally use sed(1)-i
but she’s on GNU/Linux so it wasn’t a problem here. The more professional Unix way of solving this is:
find * -name \*.jrxml -print0 | while IFS= read -d '' -r file; do
ed -s "$file" <<-'EOF'
1,$g/ uuid="[^"]*"/s///g
w
q
EOF
done
(These four spaces are tabs, otherwise it won’t work, and you need mksh(1) or another shell that can read NUL-separated input.)
You could also use Perl:
find * -name \*.jrxml -print0 | xargs -0 perl -pi -e 's/ uuid="[^"]*"//g'
Or something like that, anyway, depending on your needs, your xargs(1), etc. ;-)
If you're using ireport 4.6 or greater, the best way to solve the issue with uuid is, use the similar ireport 4.6 or greater, as the uuid attribute is newly introduce from version 4.6.
otherwise If you remove the uuid manually from the jrxml file, the uuid will again be placed in corresponding tags on the next compilation...
This problem occurred in my case because of duplicated class path entries, more specifically entries from older versions of jasperreports-core-renderer.jar and jasperreports-extensions.jar (in Options -> Classpath).
These duplicated entries appeared after importing settings during an upgrade of iReport. Apparently this is due to a bug in iReport due to which old versions are not removed from the classpath.
So either avoid the import of settings from previous versions or manually remove outdated .jars.
I have a good easy solution.
I am supporting reports on Jasper Server 4.5, with Jasper Studio 5.5
- In Jasper Studio, delete the server reference if there is one.
- Recreate the connection. When you create the server connection, go to "Advanced Settings > Jasper Server Library Version" and select your server version from the list.
- Open your report, check that the uuid tags have been removed, Deploy