maxr Posted August 5, 2010 Share Posted August 5, 2010 Hello,I'm working with JapserReports 3.7.1 and cannot compile my created *.jrxml file.I'm getting the following error message:org.xml.sax.SAXParseException: Validation error: line: 264; col: 247; {http://jasperreports.sourceforge.net/jasperreports/components}:list : Element is not allowed. line 264 and the following ones of the *.jrxml file: <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical"> <datasetRun subDataset="dataset1"> <dataSourceExpression><![CDATA[new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($P{LIST_PARAMETER})]]></dataSourceExpression> </datasetRun> <jr:listContents height="19" width="181"> <textField> <reportElement x="0" y="0" width="181" height="19"/> <textElement verticalAlignment="Top" lineSpacing="Single"> <font fontName="Arial" isBold="true" isUnderline="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["• "+$F{name}]]></textFieldExpression> </textField> </jr:listContents> </jr:list> *edit: the parameter $P{LIST_PARAMETER} contains an ArrayList of Objectsthe field $F{name} shows the String Object.getName();What can be the source of my problem?thanks in advance. Max R Post Edited by maxr at 08/05/2010 11:15 Link to comment Share on other sites More sharing options...
abdon Posted August 5, 2010 Share Posted August 5, 2010 What the error message says is the the <list> element is in the wrong place (maybe improperly nested). Bruno Abdon Link to comment Share on other sites More sharing options...
maxr Posted August 6, 2010 Author Share Posted August 6, 2010 Hm,...I don't think that it's improperly nested, because I created the .jrxml with IReport.I guess that JasperReports doesn't know the list component. Maybe wrong version??? Link to comment Share on other sites More sharing options...
abdon Posted August 6, 2010 Share Posted August 6, 2010 Maybe. Make sure you use the latest version of iReport and of the Jasper library to compile it (in the case you're not compiling from iReport).I have succesfully used the list component with 3.7.4.Bruno Abdon Link to comment Share on other sites More sharing options...
maxr Posted August 10, 2010 Author Share Posted August 10, 2010 Thanks for your answers, bruno.My application is running on a server.If I try to compile the *.jrxml on my local machine it works.... Libraries and JR version on server and local machine are identical .I am still trying to find the reason for that. Link to comment Share on other sites More sharing options...
maxr Posted August 10, 2010 Author Share Posted August 10, 2010 Hey,my problem is finally solved. My colleague added following line to the java source code:JRProperties.setProperty(JRProperties.COMPILER_XML_VALIDATION,false); In the jrxml-file we added the attribute 'language="java"' in the first tag.After that my jrxml is compiled correctly without throwing an exception. CheersMaxR Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now