Jump to content
Changes to the Jaspersoft community edition download ×

Newbie: Problems compiling report


Recommended Posts

By: Michel Bertrand - mbertrand

Newbie: Problems compiling report

2003-11-28 04:59

Hi !

 

I'm having several problemas to compile my reports. When I try to compile a report using I have lots of errors saying my report file have entities without required attributes, like:

 

r.parseElement(XmlParser.java:1037)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseDocument(XmlParser.java:416)

at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:167)

at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)

at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)

at org.apache.commons.digester.Digester.parse(Digester.java:1567)

at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:373)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:357)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:337)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:323)

at dori.jasper.engine.JasperManager.loadXmlDesign(JasperManager.java:1017)

at com.datasul.technology.report.Reports.process(Reports.java:35)

at com.datasul.technology.report.Reports.<init>(Reports.java:26)

at com.datasul.technology.report.Reports.main(Reports.java:67)

28/11/2003 12:58:48 org.apache.commons.digester.Digester error

SEVERE: Parse Error at line 22 column 11: Element type 'staticText' was not declared

org.xml.sax.SAXParseException: Element type 'staticText' was not declared

at gnu.xml.pipeline.ValidationConsumer.error(ValidationConsumer.java:420)

at gnu.xml.pipeline.ValidationConsumer.startElement(ValidationConsumer.java:986)

at gnu.xml.aelfred2.SAXDriver.startElement(SAXDriver.java:836)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1037)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseDocument(XmlParser.java:416)

at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:167)

at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)

at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)

at org.apache.commons.digester.Digester.parse(Digester.java:1567)

at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:373)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:357)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:337)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:323)

at dori.jasper.engine.JasperManager.loadXmlDesign(JasperManager.java:1017)

at com.datasul.technology.report.Reports.process(Reports.java:35)

at com.datasul.technology.report.Reports.<init>(Reports.java:26)

at com.datasul.technology.report.Reports.main(Reports.java:67)

28/11/2003 12:58:48 org.apache.commons.digester.Digester error

SEVERE: Parse Error at line 23 column 43: Attribute 'x' was not declared for element type reportElement

org.xml.sax.SAXParseException: Attribute 'x' was not declared for element type reportElement

at gnu.xml.pipeline.ValidationConsumer.error(ValidationConsumer.java:420)

at gnu.xml.pipeline.ValidationConsumer.startElement(ValidationConsumer.java:1013)

at gnu.xml.aelfred2.SAXDriver.startElement(SAXDriver.java:836)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1042)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseContent(XmlParser.java:1207)

at gnu.xml.aelfred2.XmlParser.parseElement(XmlParser.java:1038)

at gnu.xml.aelfred2.XmlParser.parseDocument(XmlParser.java:416)

at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:167)

at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)

at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)

at org.apache.commons.digester.Digester.parse(Digester.java:1567)

at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:373)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:357)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:337)

at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:323)

at dori.jasper.engine.JasperManager.loadXmlDesign(JasperManager.java:1017)

at com.datasul.technology.report.Reports.process(Reports.java:35)

at com.datasul.technology.report.Reports.<init>(Reports.java:26)

at com.datasul.technology.report.Reports.main(Reports.java:67)

 

The xml desing file corresponding to errors is:

 

<?xml version="1.0" encoding="UTF-8"?>

 

<jasperReport name="Dialetos por Idioma" >

<parameter name="Title" class="java.lang.String"/>

<queryString><![CDATA[select des_idiom_trad, des_dialet_idiom from idiom_trad, dialet_idiom where cod_idiom_trad = cod_dialet_pai ]]></queryString>

<field name="DES_IDIOM_TRAD" class="java.lang.String"/>

<field name="DES_DIALET_IDIOM" class="java.lang.String"/>

<title>

<band height="50">

<textField>

<reportElement x="0" y="0" width="200" height="50" />

<textFieldExpression class="java.lang.String">$P{Title}</textFieldExpression>

</textField>

</band>

</title>

<pageHeader>

<band>

</band>

</pageHeader>

<columnHeader>

<band height="20">

<staticText>

<reportElement x="180" y="0" width="180" height="20"/>

<textElement>

<font isUnderline="true"/>

</textElement>

<text><![CDATA[DES_IDIOM_TRAD]]></text>

</staticText>

<staticText>

<reportElement x="360" y="0" width="180" height="20"/>

<textElement>

<font isUnderline="true"/>

</textElement>

<text><![CDATA[DES_DIALET_IDIOM]]></text>

</staticText>

</band>

</columnHeader>

 

<detail>

<band height="20">

<textField>

<reportElement x="180" y="0" width="180" height="20"/>

<textFieldExpression class="java.lang.String"><![CDATA[$F{DES_IDIOM_TRAD}]]></textFieldExpression>

</textField>

<textField pattern="0.00">

<reportElement x="360" y="0" width="180" height="20"/>

<textFieldExpression class="java.lang.Double"><![CDATA[$F{DES_DIALET_IDIOM}]]></textFieldExpression>

</textField>

</band>

</detail>

 

<columnFooter>

<band>

</band>

</columnFooter>

 

<pageFooter>

<band height="15">

<staticText>

<reportElement x="0" y="0" width="40" height="15"/>

<textElement/>

<text><![CDATA[Page:]]></text>

</staticText>

<textField>

<reportElement x="40" y="0" width="100" height="15"/>

<textElement/>

<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>

</textField>

</band>

</pageFooter>

 

<summary>

<band>

</band>

</summary>

 

</jasperReport>

 

I'm using jasperreports-0.5.0.jar.

 

Any help will be really appreciated.

 

Tks in advance,

Michel.

 

 

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Newbie: Problems compiling report

2003-11-28 10:55

 

Hi,

 

Your XML is missing the DOCTYPE header.

Check the samples.

 

Thank you,

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...