Jump to content
Changes to the Jaspersoft community edition download ×

Cannot generate report : Invalid content was found


xenon341

Recommended Posts

Hi every one !

I have a problem with a report, preview is fine, but I can't deploy it on JasperServer because I have this error :

 

 1 - org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:table'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.
java.lang.Exception: 1 - org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:table'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.      at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403)      at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320)      at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70)      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)      at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 

 

I don't understand why the preview is fine but not the deployment on the server.

 

iReport 3.7.3 on Windows XP

JasperServer 3.7.0 with Tomcat 5.5 on Windows 2000 Server.

I join the XML of my report if it can help.

 

Thanks :)

 

 

 

 

Code:
<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="derive" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <style name="Crosstab Data Text" hAlign="Center"/> <style name="table">  <box>   <pen lineWidth="1.0" lineColor="#000000"/>  </box> </style> <style name="table_TH" mode="Opaque" backcolor="#F0F8FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table_CH" mode="Opaque" backcolor="#BFE1FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table_TD" mode="Opaque" backcolor="#FFFFFF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 1">  <box>   <pen lineWidth="1.0" lineColor="#000000"/>  </box> </style> <style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 2">  <box>   <pen lineWidth="1.0" lineColor="#000000"/>  </box> </style> <style name="table 2_TH" mode="Opaque" backcolor="#F0F8FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 2_CH" mode="Opaque" backcolor="#BFE1FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 2_TD" mode="Opaque" backcolor="#FFFFFF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 3">  <box>   <pen lineWidth="1.0" lineColor="#000000"/>  </box> </style> <style name="table 3_TH" mode="Opaque" backcolor="#F0F8FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 3_CH" mode="Opaque" backcolor="#BFE1FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 3_TD" mode="Opaque" backcolor="#FFFFFF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 4">  <box>   <pen lineWidth="1.0" lineColor="#000000"/>  </box> </style> <style name="table 4_TH" mode="Opaque" backcolor="#F0F8FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 4_CH" mode="Opaque" backcolor="#BFE1FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 4_TD" mode="Opaque" backcolor="#FFFFFF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 5">  <box>   <pen lineWidth="1.0" lineColor="#000000"/>  </box> </style> <style name="table 5_TH" mode="Opaque" backcolor="#F0F8FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 5_CH" mode="Opaque" backcolor="#BFE1FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 5_TD" mode="Opaque" backcolor="#FFFFFF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 6">  <box>   <pen lineWidth="1.0" lineColor="#000000"/>  </box> </style> <style name="table 6_TH" mode="Opaque" backcolor="#F0F8FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 6_CH" mode="Opaque" backcolor="#BFE1FF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <style name="table 6_TD" mode="Opaque" backcolor="#FFFFFF">  <box>   <pen lineWidth="0.5" lineColor="#000000"/>  </box> </style> <subDataset name="DS1">  <parameter name="Release" class="java.lang.Integer" isForPrompting="false"/>  <parameter name="idAvenant" class="java.lang.String"/>  <queryString>   <![CDATA[sELECT     demande_ou_projet.`Mot_Cle` AS demande_ou_projet_Mot_Cle,     demande_ou_projet.`Libelle` AS demande_ou_projet_Libelle,     ordre_de_travail.`TypeActivite` AS ordre_de_travail_TypeActivite,     ordre_de_travail.`charge_prevue` AS ordre_de_travail_charge_prevue,     ordre_de_travail.`charge_consommee_totale` AS ordre_de_travail_charge_consommee_totale,     ordre_de_travail.`charge_restante` AS ordre_de_travail_charge_restante,     demande_ou_projet.`IdAvenant` AS demande_ou_projet_IdAvenant,     demande_ou_projet.`Type_demande` AS demande_ou_projet_Type_demande,     demande_ou_projet.`lot` AS demande_ou_projet_lotFROM     `demande_ou_projet` demande_ou_projet LEFT OUTER JOIN `ordre_de_travail` ordre_de_travail ON demande_ou_projet.`IdDemande` = ordre_de_travail.`IdDemande`WHERE     demande_ou_projet.`Type_demande` = '_CR' AND demande_ou_projet.`lot` = $P{Release} AND demande_ou_projet.`IdAvenant` = $P{idAvenant}GROUP BY     demande_ou_projet_IdAvenant,     ordre_de_travail_TypeActivite]]>  </queryString>  <field name="demande_ou_projet_Mot_Cle" class="java.lang.String"/>  <field name="demande_ou_projet_Libelle" class="java.lang.String"/>  <field name="ordre_de_travail_TypeActivite" class="java.lang.String"/>  <field name="ordre_de_travail_charge_prevue" class="java.lang.Double"/>  <field name="ordre_de_travail_charge_consommee_totale" class="java.lang.Double"/>  <field name="ordre_de_travail_charge_restante" class="java.lang.Double"/>  <field name="demande_ou_projet_IdAvenant" class="java.lang.String"/>  <field name="demande_ou_projet_Type_demande" class="java.lang.String"/>  <field name="demande_ou_projet_lot" class="java.lang.String"/>  <variable name="derive" class="java.lang.String">   <variableExpression><![CDATA[$F{ordre_de_travail_charge_prevue}-($F{ordre_de_travail_charge_consommee_totale}+$F{ordre_de_travail_charge_restante})]]></variableExpression>  </variable>  <group name="ordre_de_travail_TypeActivite">   <groupExpression><![CDATA[$F{ordre_de_travail_TypeActivite}]]></groupExpression>  </group> </subDataset> <parameter name="Release" class="java.lang.Integer"/> <queryString>  <![CDATA[sELECT     ordre_de_travail.`TypeActivite` AS ordre_de_travail_TypeActivite,     demande_ou_projet.`IdAvenant` AS demande_ou_projet_IdAvenant,     ordre_de_travail.`charge_prevue` AS ordre_de_travail_charge_prevue,     ordre_de_travail.`charge_consommee_totale` AS ordre_de_travail_charge_consommee_totale,     ordre_de_travail.`charge_restante` AS ordre_de_travail_charge_restanteFROM     `demande_ou_projet` demande_ou_projet LEFT OUTER JOIN `ordre_de_travail` ordre_de_travail ON demande_ou_projet.`IdDemande` = ordre_de_travail.`IdDemande`WHERE     demande_ou_projet.`Type_demande` = '_CR' AND demande_ou_projet.`lot` = $P{Release}GROUP BY     demande_ou_projet_IdAvenant]]> </queryString> <field name="ordre_de_travail_TypeActivite" class="java.lang.String"/> <field name="demande_ou_projet_IdAvenant" class="java.lang.String"/> <field name="ordre_de_travail_charge_prevue" class="java.lang.Double"/> <field name="ordre_de_travail_charge_consommee_totale" class="java.lang.Double"/> <field name="ordre_de_travail_charge_restante" class="java.lang.Double"/> <variable name="derive" class="java.lang.Integer">  <variableExpression><![CDATA[$F{ordre_de_travail_charge_prevue}-($F{ordre_de_travail_charge_consommee_totale}+$F{ordre_de_travail_charge_restante})]]></variableExpression> </variable> <background>  <band splitType="Stretch"/> </background> <title>  <band height="79" splitType="Stretch"/> </title> <pageHeader>  <band height="35" splitType="Stretch"/> </pageHeader> <columnHeader>  <band height="20" splitType="Stretch"/> </columnHeader> <detail>  <band height="70" splitType="Stretch">   <textField>    <reportElement x="30" y="0" width="100" height="20"/>    <textElement/>    <textFieldExpression class="java.lang.String"><![CDATA[$F{demande_ou_projet_IdAvenant}]]></textFieldExpression>   </textField>   <componentElement>    <reportElement key="table 6" style="table 6" x="0" y="20" width="555" height="50"/>    <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">     <datasetRun subDataset="DS1">      <datasetParameter name="Release">       <datasetParameterExpression><![CDATA[$P{Release}]]></datasetParameterExpression>      </datasetParameter>      <datasetParameter name="idAvenant">       <datasetParameterExpression><![CDATA[$F{demande_ou_projet_IdAvenant}]]></datasetParameterExpression>      </datasetParameter>      <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>     </datasetRun>     <jr:column width="90">      <jr:columnHeader style="table 6_CH" height="30">       <staticText>        <reportElement x="0" y="0" width="90" height="30"/>        <textElement/>        <text><![CDATA[ordre_de_travail_TypeActivite]]></text>       </staticText>      </jr:columnHeader>      <jr:detailCell style="table 6_TD" height="20">       <textField>        <reportElement x="0" y="0" width="90" height="20"/>        <textElement/>        <textFieldExpression class="java.lang.String"><![CDATA[$F{ordre_de_travail_TypeActivite}]]></textFieldExpression>       </textField>      </jr:detailCell>     </jr:column>     <jr:column width="90">      <jr:columnHeader style="table 6_CH" height="30">       <staticText>        <reportElement x="0" y="0" width="90" height="30"/>        <textElement/>        <text><![CDATA[ordre_de_travail_charge_prevue]]></text>       </staticText>      </jr:columnHeader>      <jr:detailCell style="table 6_TD" height="20">       <textField>        <reportElement x="0" y="0" width="90" height="20"/>        <textElement/>        <textFieldExpression class="java.lang.Double"><![CDATA[$F{ordre_de_travail_charge_prevue}]]></textFieldExpression>       </textField>      </jr:detailCell>     </jr:column>     <jr:column width="90">      <jr:columnHeader style="table 6_CH" height="30">       <staticText>        <reportElement x="0" y="0" width="90" height="30"/>        <textElement/>        <text><![CDATA[ordre_de_travail_charge_consommee_totale]]></text>       </staticText>      </jr:columnHeader>      <jr:detailCell style="table 6_TD" height="20">       <textField>        <reportElement x="0" y="0" width="90" height="20"/>        <textElement/>        <textFieldExpression class="java.lang.Double"><![CDATA[$F{ordre_de_travail_charge_consommee_totale}]]></textFieldExpression>       </textField>      </jr:detailCell>     </jr:column>     <jr:column width="90">      <jr:columnHeader style="table 6_CH" height="30">       <staticText>        <reportElement x="0" y="0" width="90" height="30"/>        <textElement/>        <text><![CDATA[ordre_de_travail_charge_restante]]></text>       </staticText>      </jr:columnHeader>      <jr:detailCell style="table 6_TD" height="20">       <textField>        <reportElement x="0" y="0" width="90" height="20"/>        <textElement/>        <textFieldExpression class="java.lang.Double"><![CDATA[$F{ordre_de_travail_charge_restante}]]></textFieldExpression>       </textField>      </jr:detailCell>     </jr:column>     <jr:column width="90">      <jr:columnHeader style="table 6_CH" height="30">       <staticText>        <reportElement x="0" y="0" width="90" height="30"/>        <textElement/>        <text><![CDATA[Derive]]></text>       </staticText>      </jr:columnHeader>      <jr:detailCell style="table 6_TD" height="20">       <textField>        <reportElement x="0" y="0" width="90" height="20"/>        <textElement/>        <textFieldExpression class="java.lang.String"><![CDATA[$V{derive}]]></textFieldExpression>       </textField>      </jr:detailCell>     </jr:column>    </jr:table>   </componentElement>  </band> </detail> <columnFooter>  <band height="45" splitType="Stretch"/> </columnFooter> <pageFooter>  <band height="54" splitType="Stretch"/> </pageFooter> <summary>  <band height="66" splitType="Stretch"/> </summary></jasperReport>
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Hi !

Thanks for you answer, and sorry for my late one :D

So, you tell me that iReport 3.7.3 is the problem, so I tried with 3.7.2 to do the same report, with table, and I've got the same error.

So, my report is faulty but, how can I do to make it works ?

I'm sorry about my "newbieness", I just try to understand :D

Thanks,

Cordially.

Link to comment
Share on other sites

  • 3 weeks later...

 I suggest a note is added to the iRport page.  Took me a long time to determine the root cause of this problem.

Another helpful thing would be to have a link to iReport 3.7.0 I am still looking for that.  Server is on one machine on Ubuntu and I am developing on another in Vista.

Link to comment
Share on other sites

  • 4 months later...

 I apologize for crossposting, but there is another thread on this subject here:

http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=77027

It recommends using the .jar's from iReport, which I have done (iReport 3.7.6) but I still receive this error. I have replied in the above linked thread with the exact error I am receiving and details about my setup. Could those of you who participated in this thread provide your recommendations or suggestions in that other one?

Thank you!

CHgsd

Link to comment
Share on other sites

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