Jump to content
Changes to the Jaspersoft community edition download ×

How do I fix this JRException?


2005 IR Help

Recommended Posts

By: Nishant Miglani - nishantm

How do I fix this JRException?

2004-02-11 09:56

 

Hi All,

 

I was trying to run my first Jasper design program.

 

I got an exception saying "JRException: The processing instruction target matching "[xX][mM][lL]" is not allowed."

 

What should I do? Any help is certainly appreciated.

 

Thanks

 

 

 

 

By: Tobias Gaekle - ike987

RE: How do I fix this JRException?

2004-02-12 01:27

do you use an XML-template for the report? if so, make sure your file starts with

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

 

 

 

 

By: Nishant Miglani - nishantm

RE: How do I fix this JRException?

2004-02-12 09:37

I'll copy and paste the code of the XML here. I'm not sure if it will appear okay. Please see if there is any problem with the XML.

 

The XML I tried to run was copied and pasted directly from this site, from the samples sub-section. It is my first example to see how Jasper works:

 

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

<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">

<jasperReport name="FontsReport" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30" columnCount="1" printOrder="Vertical" orientation="Portrait" whenNoDataType="NoPages" columnSpacing="0" isTitleNewPage="false" isSummaryNewPage="false">

<title>

<band height="782" isSplitAllowed="true">

<staticText>

<reportElement x="0" y="50" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="50" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="50" width="200" height="40"/><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="100" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font size="12" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="100" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="100" width="200" height="40"/><textElement><font size="14"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="150" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="serif" size="12" pdfFontName="Times-Roman" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="150" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="150" width="200" height="40"/><textElement><font fontName="serif" size="12" pdfFontName="Times-Roman"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="200" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="serif" size="12" isBold="true" isItalic="true" pdfFontName="Times-BoldItalic" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="200" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="200" width="200" height="40"/><textElement><font fontName="serif" size="12" isBold="true" isItalic="true" pdfFontName="Times-BoldItalic"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="250" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="Comic Sans MS" size="12" isBold="false" pdfFontName="COMIC.TTF" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="250" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="250" width="200" height="40"/><textElement><font fontName="Comic Sans MS" size="12" isBold="false" pdfFontName="COMIC.TTF"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="300" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="Comic Sans MS" size="12" isBold="true" pdfFontName="COMICBD.TTF" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="300" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="300" width="200" height="40"/><textElement><font fontName="Comic Sans MS" size="12" isBold="true" pdfFontName="COMICBD.TTF"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="350" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="monospaced" size="12" isItalic="true" isUnderline="true" pdfFontName="Courier-Oblique" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="350" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="350" width="200" height="40"/><textElement><font fontName="monospaced" size="12" isItalic="true" isUnderline="true" pdfFontName="Courier-Oblique"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="400" width="200" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="monospaced" size="12" isBold="true" isStrikeThrough="true" pdfFontName="Courier-Bold" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="400" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="400" width="200" height="40"/><textElement><font fontName="monospaced" size="12" isBold="true" isStrikeThrough="true" pdfFontName="Courier-Bold"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="450" width="200" height="40" forecolor="#FF0000" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font size="14" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="450" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="450" width="200" height="40" forecolor="#FF0000"/><textElement><font size="14"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

<staticText>

<reportElement x="0" y="500" width="200" height="40" forecolor="#00FF00" backcolor="#FFFF00" mode="Opaque" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font fontName="serif" size="14" isBold="true" isItalic="true" pdfFontName="Times-BoldItalic" />

</textElement>

<text>The quick brown fox jumps over the lazy dog.</text>

</staticText>

<staticText>

<reportElement x="210" y="500" width="340" height="40" positionType="FixRelativeToTop" isPrintRepeatedValues="true" isRemoveLineWhenBlank="false" isPrintInFirstWholeBand="false" isPrintWhenDetailOverflows="false" />

<text>

<![CDATA[

<staticText><reportElement x="0" y="500" width="200" height="40" forecolor="#00FF00" backcolor="#FFFF00" mode="Opaque"/><textElement><font fontName="serif" size="14" isBold="true" isItalic="true" pdfFontName="Times-BoldItalic"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>

 

 

]]>

</text>

</staticText>

</band>

</title>

</jasperReport>

 

 

 

 

By: Tobias Gaekle - ike987

RE: How do I fix this JRException?

2004-02-13 01:20

remove the whitespace before <?xml.

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...