Jump to content
Changes to the Jaspersoft community edition download ×

Jasper XML compile error


2004 IR Help

Recommended Posts

By: evgenykravchenko - ekravche

Jasper XML compile error

2005-07-18 16:54

Hello, I'm trying to compile this simple jasper XML report, but I get an error doing so. Any help would be greatly appreciated.

 

 

<-----------------------------begin XML ------------------------>

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

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

 

<jasperReport name="SmallReport" pageWidth="595" pageHeight="842" columnWidth="540" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30">

<field name="NAME" class="java.lang.String">

</field>

<title>

<band height="50">

<staticText>

<reportElement positionType="Float" x="0" y="0" width="842" height="50"/>

<textElement>

<font size="16" isBold="true"/>

</textElement>

<text><![CDATA[sample Report]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="49" y="12" width="0" height="0"/>

<textElement/>

<textFieldExpression class="java.lang.String"><![CDATA["text field"]]></textFieldExpression>

</textField>

</band>

</title>

<pageHeader>

<band>

</band>

</pageHeader>

<columnHeader>

<band height="20">

<staticText>

<reportElement positionType="Float" x="4" y="0" width="108" height="20"/>

<textElement>

<font isUnderline="true"/>

</textElement>

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

</staticText>

</band>

</columnHeader>

</jasperReport>

 

<------------------------------end XML ------------------------>

 

 

Thank you in advance.

 

 

 

 

By: evgenykravchenko - ekravche

RE: Jasper XML compile error

2005-07-19 09:40

I've removed the above specified xml, but I'm still getting an error.

 

<-----------------------------begin XML ------------------------>

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

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

 

<jasperReport name="SmallReport" pageWidth="595" pageHeight="842" columnWidth="540" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30">

<field name="Name" class="java.lang.String">

</field>

<title>

<band height="50">

<staticText>

<reportElement positionType="Float" x="0" y="0" width="553" height="48"/>

<textElement textAlignment="Center">

<font fontName="sansserif" size="16" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

</textElement>

<text><![CDATA[simple Report]]></text>

</staticText>

</band>

</title>

<pageHeader>

<band>

</band>

</pageHeader>

<columnHeader>

<band height="20">

<staticText>

<reportElement positionType="Float" x="4" y="0" width="108" height="20"/>

<textElement>

<font isUnderline="true"/>

</textElement>

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

</staticText>

</band>

</columnHeader>

<detail>

<band height="20">

<textField isStretchWithOverflow="true">

<reportElement positionType="Float" x="4" y="3" width="200" height="12"/>

<textElement>

<font fontName="sansserif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

</textElement>

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

</textField>

<line>

<reportElement positionType="Float" x="0" y="19" width="515" height="1" forecolor="#808080"/>

<graphicElement/>

</line>

</band>

</detail>

<pageFooter>

<band height="40">

<line>

<reportElement x="0" y="33" width="513" height="1"/>

<graphicElement/>

</line>

<rectangle>

<reportElement positionType="Float" x="227" y="16" width="0" height="0"/>

<graphicElement/>

</rectangle>

</band>

</pageFooter>

<summary>

<band height="60">

</band>

</summary>

</jasperReport>

<------------------------------end XML ------------------------>

 

It would be very useful if the line number of the invalid XML would be specified.

 

Thanx in advance.

 

 

 

 

By: evgenykravchenko - ekravche

RE: Jasper XML compile error

2005-07-19 10:42

I'm getting the following errors when I try to programmatically compile the above report

 

 

<-----------------------------begin error------------------------>

java.io.IOException: CreateProcess: javac -classpath C:toolseclipseworkspaceopenreportsPrototypeWebRootWEB-INFclasses;C:samplesopenreportsopenreportswebappWEB-INFlibjasperreports-0.6.5.jar;C:samplesopenreportsopenreportswebappWEB-INFlibjfreechart-0.9.21.jar;C:samplesopenreportsopenreportswebappWEB-INFlibxwork-1.0.2.jar;C:samplesopenreportsopenreportswebappWEB-INFlibactivation.jar;C:samplesopenreportsopenreportswebappWEB-INFlibbsh-1.3.0.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-beanutils-1.6.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-codec-1.3.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-collections-2.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-pool-1.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibdisplaytag-1.0.jar;C:samplesopenreportsopenreportswebappWEB-INFlibitext-1.02b.jar;C:samplesopenreportsopenreportswebappWEB-INFlibjcommon-0.9.6.jar;C:samplesopenreportsopenre?

at java.lang.Win32Process.create(Native Method)

at java.lang.Win32Process.<init>(Unknown Source)

at java.lang.Runtime.execInternal(Native Method)

at java.lang.Runtime.exec(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClass(JRJavacCompiler.java:60)

at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileReport(JRAbstractClassCompiler.java:107)

at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:106)

at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212)

at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:145)

at ReportSource.getData(ReportSource.java:53)

at ReportSource.main(ReportSource.java:83)

 

NESTED BY :

java.io.IOException: CreateProcess: javac -classpath C:toolseclipseworkspaceopenreportsPrototypeWebRootWEB-INFclasses;C:samplesopenreportsopenreportswebappWEB-INFlibjasperreports-0.6.5.jar;C:samplesopenreportsopenreportswebappWEB-INFlibjfreechart-0.9.21.jar;C:samplesopenreportsopenreportswebappWEB-INFlibxwork-1.0.2.jar;C:samplesopenreportsopenreportswebappWEB-INFlibactivation.jar;C:samplesopenreportsopenreportswebappWEB-INFlibbsh-1.3.0.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-beanutils-1.6.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-codec-1.3.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-collections-2.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-pool-1.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibdisplaytag-1.0.jar;C:samplesopenreportsopenreportswebappWEB-INFlibitext-1.02b.jar;C:samplesopenreportsopenreportswebappWEB-INFlibjcommon-0.9.6.jar;C:samplesopenreportsopenre?

at java.lang.Win32Process.create(Native Method)

at java.lang.Win32Process.<init>(Unknown Source)

at java.lang.Runtime.execInternal(Native Method)

at java.lang.Runtime.exec(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClass(JRJavacCompiler.java:60)

at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileReport(JRAbstractClassCompiler.java:107)

at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:106)

at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212)

at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:145)

at ReportSource.getData(ReportSource.java:53)

at ReportSource.main(ReportSource.java:83)

 

NESTED BY :

net.sf.jasperreports.engine.JRException: Error compiling report java source file : C:toolseclipseworkspaceopenreportsPrototypeSmallReport.java

at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClass(JRJavacCompiler.java:85)

at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileReport(JRAbstractClassCompiler.java:107)

at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:106)

at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:212)

at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:145)

at ReportSource.getData(ReportSource.java:53)

at ReportSource.main(ReportSource.java:83)

Caused by: java.io.IOException: CreateProcess: javac -classpath C:toolseclipseworkspaceopenreportsPrototypeWebRootWEB-INFclasses;C:samplesopenreportsopenreportswebappWEB-INFlibjasperreports-0.6.5.jar;C:samplesopenreportsopenreportswebappWEB-INFlibjfreechart-0.9.21.jar;C:samplesopenreportsopenreportswebappWEB-INFlibxwork-1.0.2.jar;C:samplesopenreportsopenreportswebappWEB-INFlibactivation.jar;C:samplesopenreportsopenreportswebappWEB-INFlibbsh-1.3.0.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-beanutils-1.6.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-codec-1.3.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-collections-2.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibcommons-pool-1.1.jar;C:samplesopenreportsopenreportswebappWEB-INFlibdisplaytag-1.0.jar;C:samplesopenreportsopenreportswebappWEB-INFlibitext-1.02b.jar;C:samplesopenreportsopenreportswebappWEB-INFlibjcommon-0.9.6.jar;C:samplesopenreportsopenre?

at java.lang.Win32Process.create(Native Method)

at java.lang.Win32Process.<init>(Unknown Source)

at java.lang.Runtime.execInternal(Native Method)

at java.lang.Runtime.exec(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClass(JRJavacCompiler.java:60)

... 6 more

 

<-----------------------------end error------------------------>

 

 

 

 

 

By: evgenykravchenko - ekravche

RE: Jasper XML compile error

2005-07-18 17:08

I'm trying to compile this XML report layout, but I'm still getting a compile error. I hope that someone can help me.

 

<-----------------------------begin XML ------------------------>

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

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

 

<jasperReport name="SmallReport" pageWidth="595" pageHeight="842" columnWidth="540" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30">

<field name="Name" class="java.lang.String">

</field>

<title>

<band height="50">

<staticText>

<reportElement positionType="Float" x="0" y="0" width="553" height="48"/>

<textElement textAlignment="Center">

<font fontName="sansserif" size="16" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

</textElement>

<text><![CDATA[simple Report]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="49" y="12" width="0" height="0"/>

<textElement/>

<textFieldExpression class="java.lang.String"><![CDATA["text field"]]></textFieldExpression>

</textField>

</band>

</title>

<pageHeader>

<band>

</band>

</pageHeader>

<columnHeader>

<band height="20">

<staticText>

<reportElement positionType="Float" x="4" y="0" width="108" height="20"/>

<textElement>

<font isUnderline="true"/>

</textElement>

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

</staticText>

</band>

</columnHeader>

<detail>

<band height="20">

<textField isStretchWithOverflow="true">

<reportElement positionType="Float" x="4" y="3" width="200" height="12"/>

<textElement>

<font fontName="sansserif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

</textElement>

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

</textField>

<line>

<reportElement positionType="Float" x="0" y="19" width="515" height="1" forecolor="#808080"/>

<graphicElement/>

</line>

</band>

</detail>

<pageFooter>

<band height="40">

<line>

<reportElement x="0" y="33" width="513" height="1"/>

<graphicElement/>

</line>

<rectangle>

<reportElement positionType="Float" x="227" y="16" width="0" height="0"/>

<graphicElement/>

</rectangle>

</band>

</pageFooter>

<summary>

<band height="60">

</band>

</summary>

</jasperReport>

<------------------------------end XML ------------------------>

 

 

 

 

By: Radha - radharani

RE: Jasper XML compile error

2005-07-18 23:23

Hi,

 

<textField>

<reportElement positionType="Float" x="49" y="12" width="0" height="0"/>

<textElement/>

<textFieldExpression class="java.lang.String"><![CDATA["text field"]]></textFieldExpression>

</textField>

 

 

remove this part from your report. it will get compiled.

 

 

 

 

By: Radha - radharani

RE: Jasper XML compile error

2005-07-20 03:47

Hi,

 

what error you are getting? because i compiled the same report. it is not giving any error.

 

Regds

 

 

 

 

By: evgenykravchenko - ekravche

RE: Jasper XML compile error

2005-07-20 10:02

I was trying to compile it using code and it failed, but when I compile it using the OpenReports Designer it works.

 

No worries, as long as I can compile the xml one way it's all good.

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