title: JasperReport Error : Source text : new java.lang.Integer(1)
body: <p>When i compile my .jrxml file from iReport i have no issue and everything goes fine. but when I try to print from my Java program it's show an error like this:</p>
  
  <blockquote>
    <p>Error evaluating expression :     Source text : new java.lang.Integer(1)</p>
  </blockquote>
  
  <p>Here is my .jrxml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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="TOM_list_ot_report" language="groovy" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="822" leftMargin="10" rightMargin="10" topMargin="10" bottomMargin="10" uuid="581e1703-9505-417f-be68-bada03c8d692"&gt;
      &lt;property name="ireport.zoom" value="1.0"/&gt;
      &lt;property name="ireport.x" value="0"/&gt;
      &lt;property name="ireport.y" value="0"/&gt;
      &lt;style name="table"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_TH" mode="Opaque" backcolor="#F0F8FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_CH" mode="Opaque" backcolor="#BFE1FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 2"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="1.0" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 2_TH" mode="Opaque" backcolor="#F0F8FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 2_CH" mode="Opaque" backcolor="#BFE1FF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;style name="table 2_TD" mode="Opaque" backcolor="#FFFFFF"&gt;
          &lt;box&gt;
              &lt;pen lineWidth="0.5" lineColor="#000000"/&gt;
          &lt;/box&gt;
      &lt;/style&gt;
      &lt;subDataset name="Table Dataset 1" uuid="8573296a-9744-48d2-bb40-8c4b100b3bc9"/&gt;
      &lt;parameter name="ttLogo" class="java.lang.String"/&gt;
      &lt;queryString&gt;
          &lt;![CDATA[]]&gt;
      &lt;/queryString&gt;
      &lt;field name="client" class="java.lang.Object"/&gt;
      &lt;field name="adresse" class="java.lang.Object"/&gt;
      &lt;field name="refCommande" class="java.lang.String"/&gt;
      &lt;field name="codeAccees" class="java.lang.String"/&gt;
      &lt;field name="numeroTt" class="java.lang.String"/&gt;
      &lt;field name="commandeEtat" class="java.lang.Object"/&gt;
      &lt;field name="dateModif" class="java.util.Date"/&gt;
      &lt;field name="dateContractuel" class="java.util.Date"/&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="89" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="0" width="822" height="58" forecolor="#000099" uuid="9d752cf8-e79a-4315-aff6-74fbf7c58a0e"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="28" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Commande livraison]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;image scaleImage="FillFrame" onErrorType="Blank"&gt;
                  &lt;reportElement x="3" y="0" width="83" height="58" uuid="f5132dfc-fd13-43b3-9331-2eb7cc813690"/&gt;
                  &lt;imageExpression&gt;&lt;![CDATA[$P{ttLogo}]]&gt;&lt;/imageExpression&gt;
              &lt;/image&gt;
              &lt;textField pattern="dd/MM/yyyy HH.mm a" isBlankWhenNull="true"&gt;
                  &lt;reportElement x="681" y="68" width="141" height="20" uuid="af0f8b1b-4a6e-49b7-84d9-d733bdf3f71f"/&gt;
                  &lt;textElement textAlignment="Left" verticalAlignment="Middle"&gt;
                      &lt;font size="9"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[new java.util.Date()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement mode="Transparent" x="663" y="68" width="16" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="7ef40ab2-434f-426f-979e-de7b35e7abac"/&gt;
                  &lt;textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" markup="none"&gt;
                      &lt;font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/&gt;
                      &lt;paragraph lineSpacing="Single"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[LE]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="537" y="68" width="123" height="20" isRemoveLineWhenBlank="true" uuid="6892eaba-9d98-43ba-8ca6-8207d840f6ae"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[($F{adresse} != null) &amp;&amp; ($F{adresse}.getRegionDTO() != null)]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement textAlignment="Right" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="false"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{adresse}.getRegionDTO().getLibelleRegion()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="113" y="68" width="130" height="20" isRemoveLineWhenBlank="true" uuid="7217ea18-cb33-497e-a81d-47693a082e94"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[($F{adresse} != null) &amp;&amp; ($F{adresse}.getRegionDTO() != null)]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{adresse}.getRegionDTO().getLibelleRegion()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="3" y="68" width="110" height="20" uuid="97975b5e-d13a-4ccb-9c5a-0ff5e5ccfa33"/&gt;
                  &lt;box rightPadding="5"/&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font fontName="Serif" size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Direction regionale de  :]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band height="21"/&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="20"&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="0" y="0" width="179" height="20" backcolor="#CCFFFF" uuid="6eab9b5b-ac19-432e-991e-00f335d798ea"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="179" y="0" width="52" height="20" backcolor="#CCFFFF" uuid="17822259-754f-4b8b-8684-f141f6379f3e"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="231" y="0" width="63" height="20" backcolor="#CCFFFF" uuid="14c21801-ecd6-45c9-8ded-3d72d8fdecfa"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="294" y="0" width="89" height="20" backcolor="#CCFFFF" uuid="89beeeee-3d35-49fb-93ef-0b997db15681"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="383" y="0" width="144" height="20" backcolor="#CCFFFF" uuid="07215401-8b52-420d-9b2d-af2b49f11f70"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="527" y="0" width="140" height="20" backcolor="#CCFFFF" uuid="15d4de45-b59d-40b9-a317-11d3db940cc6"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="667" y="0" width="64" height="20" backcolor="#CCFFFF" uuid="e32b46cb-8c79-415f-b837-b1e455bc538d"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="731" y="0" width="91" height="20" backcolor="#CCFFFF" uuid="daa5973a-d676-473a-b4dd-e5a7d2ff3a12"/&gt;
              &lt;/rectangle&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="0" width="179" height="20" uuid="c045c618-ae04-4267-9146-0e81a7dcfc9b"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Ref. Commande]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="179" y="0" width="52" height="20" uuid="7a049ea7-efee-492b-85dc-2524a1ff3ae6"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[NumÃ©ro]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="231" y="0" width="63" height="20" uuid="1239f061-63fd-441e-af4a-0cda6c733ff7"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Id Access]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="294" y="0" width="89" height="20" uuid="cd63d966-725e-4e23-8127-d97559e2651f"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Nom et prÃ©nom ]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="383" y="0" width="144" height="20" uuid="bd6a1270-45e2-432b-86b3-ec6b0d86d7c9"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Adresse installation]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="527" y="0" width="140" height="20" uuid="a6bb97eb-d4d5-4188-ae80-51ca1706c1c7"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Etat commande]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="667" y="0" width="64" height="20" uuid="6c678f82-a385-4c95-80cc-609d3506ab19"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Date Ã©tat]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="731" y="0" width="91" height="20" uuid="a47f5765-1f07-4b8a-ba9b-ac330bedffa8"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font size="10" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Date contractuel]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="32" splitType="Stretch"&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="0" y="0" width="179" height="32" uuid="ec0f3d1e-71e0-49a8-af72-3b878bc1737d"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="179" y="0" width="52" height="32" uuid="fe0f82ad-508a-493a-af0f-835a93a3c9ea"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="231" y="0" width="63" height="32" uuid="4e6fefd5-9b92-451c-a4f0-a91e7d68c8f0"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="294" y="0" width="89" height="32" uuid="552df758-27c4-4800-b499-9be13265694c"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="383" y="0" width="144" height="32" uuid="5bcb83e6-3cbb-443a-83b9-ddedf55c573e"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="527" y="0" width="140" height="32" uuid="102743e9-f3cf-4100-a616-b0adb77dec36"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="667" y="0" width="64" height="32" uuid="071d3f95-5839-43ac-8bb2-9fb85df2f7c0"/&gt;
              &lt;/rectangle&gt;
              &lt;rectangle&gt;
                  &lt;reportElement x="731" y="0" width="91" height="32" uuid="5567c999-0396-46e1-b876-a9c496f38267"/&gt;
              &lt;/rectangle&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="6" y="0" width="169" height="32" isRemoveLineWhenBlank="true" uuid="e364eaad-cfb7-4df7-95cb-831522e56594"/&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{refCommande}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="184" y="0" width="42" height="32" isRemoveLineWhenBlank="true" uuid="9ee64eaf-d92e-469a-bd84-150309c21fda"/&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{numeroTt}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="236" y="0" width="53" height="32" isRemoveLineWhenBlank="true" uuid="5a3954a9-378f-4879-afac-11732b8dcf23"/&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{codeAccees}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="299" y="0" width="79" height="32" isRemoveLineWhenBlank="true" uuid="4b2c6948-0b49-4950-93c9-a6fa8f579032"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$F{client} != null]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{client}.getFullName()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="388" y="0" width="134" height="32" isRemoveLineWhenBlank="true" uuid="4e8bf206-9f34-4633-b070-225bb02bb9a5"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$F{adresse} != null]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{adresse}.getAdresseLabel()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField isBlankWhenNull="true"&gt;
                  &lt;reportElement x="532" y="0" width="130" height="32" isRemoveLineWhenBlank="true" uuid="6085dd50-e9e6-47e9-9622-577e224b4306"&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$F{commandeEtat} != null]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{commandeEtat}.getLibEtatCmd()]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField pattern="dd/MM/yyyy h.mm a" isBlankWhenNull="true"&gt;
                  &lt;reportElement x="672" y="0" width="54" height="32" isRemoveLineWhenBlank="true" uuid="3b8f5c69-ae9c-4dd8-9f8f-00ed310d39c5"/&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{dateModif}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField pattern="dd/MM/yyyy" isBlankWhenNull="true"&gt;
                  &lt;reportElement x="737" y="0" width="81" height="32" isRemoveLineWhenBlank="true" uuid="33512a65-6207-4805-93a2-4cc48c580ac4"/&gt;
                  &lt;textElement verticalAlignment="Middle"&gt;
                      &lt;font size="8"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$F{dateContractuel}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;pageFooter&gt;
          &lt;band height="14"/&gt;
      &lt;/pageFooter&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>Any ideas ?</p>
  
  <p><strong>UPDATE</strong>
  I tried to change the language to Java. and i got some errors when i compile:</p>
  
  <pre><code>The method getRegionDTO() is undefined for the type Object  
  The method getRegionDTO() is undefined for the type Object  
  The method getRegionDTO() is undefined for the type Object  
  The method getFullName() is undefined for the type Object   
  The method getAdresseLabel() is undefined for the type Object   
  The method getLibEtatCmd() is undefined for the type Object
  </code></pre>