title: Jasper Report : Document root element "jasperReport", must match DOCTYPE root "null"
body: <p>I have designed jasper report using <code>iReport</code> version (4.7.1). Through iReport it works fine. When I called from java servlet, I get an error:</p>
  
  <pre><code>Error : `Document root element "jasperReport", must match DOCTYPE root "null".`
  
  net.sf.jasperreports.engine.JRException: Document root element "jasperReport", 
  must match DOCTYPE root "null".
  
          at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:242)
          at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)
          at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)
          at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)
          at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151)
          at com.crmreport.controller.ReportServlet.processRequest(ReportServlet.java:124)
          at com.crmreport.controller.ReportServlet.doPost(ReportServlet.java:505)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
          at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
          at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
          at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:165)
          at java.lang.Thread.run(Thread.java:619)
          Caused by: org.xml.sax.SAXParseException: Document root element "jasperReport",must match DOCTYPE root "null".
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Err
  orHandlerWrapper.java:131)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
  XMLErrorReporter.java:384)
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(
  XMLErrorReporter.java:318)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootEleme
  ntSpecified(XMLDTDValidator.java:1621)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleSta
  rtElement(XMLDTDValidator.java:1900)
          at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElem
  ent(XMLDTDValidator.java:764)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
  l.scanStartElement(XMLDocumentFragmentScannerImpl.java:1357)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$Conten
  tDriver.scanRootElementHook(XMLDocumentScannerImpl.java:1289)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
  l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3084)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$Prolog
  Driver.next(XMLDocumentScannerImpl.java:912)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
  MLDocumentScannerImpl.java:645)
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
  l.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
  ML11Configuration.java:807)
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
  ML11Configuration.java:737)
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
  java:107)
          at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
  stractSAXParser.java:1205)
          at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
  arse(SAXParserImpl.java:522)
          at org.apache.commons.digester.Digester.parse(Digester.java:1745)
          at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:
  238)
  </code></pre>
  
  <p>This 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="BusinessUnitDetail" 
                pageWidth="595" 
                pageHeight="842" 
                columnWidth="535" 
                leftMargin="20" 
                rightMargin="20" 
                topMargin="20"
                bottomMargin="20" 
                uuid="22e233b2-d42c-4a93-87c6-a1d23bd3f7ca"&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="Title" forecolor="#FFFFFF" fontName="Times New Roman" fontSize="50" isBold="false" pdfFontName="Times-Bold"/&gt;
      &lt;style name="SubTitle" forecolor="#CCCCCC" fontName="Times New Roman" fontSize="18" isBold="false" pdfFontName="Times-Roman"/&gt;
      &lt;style name="Column header" forecolor="#666666" fontName="Times New Roman" fontSize="14" isBold="true" pdfFontName="Times-Roman"/&gt;
      &lt;style name="Detail" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"/&gt;
      &lt;style name="Row" mode="Transparent" fontName="Times New Roman" pdfFontName="Times-Roman"&gt;
          &lt;conditionalStyle&gt;
              &lt;conditionExpression&gt;&lt;![CDATA[$V{REPORT_COUNT}%2 == 0]]&gt;&lt;/conditionExpression&gt;
              &lt;style mode="Opaque" backcolor="#F0EFEF"/&gt;
          &lt;/conditionalStyle&gt;
      &lt;/style&gt;
      &lt;parameter name="dateFrom" class="java.util.Date"&gt;
          &lt;property name="dateFrom" value="new java.util.Date()"/&gt;
          &lt;defaultValueExpression&gt;&lt;![CDATA[new java.util.Date()]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;parameter name="dateTo" class="java.util.Date"&gt;
          &lt;property name="dateTo" value="new java.util.Date()"/&gt;
          &lt;defaultValueExpression&gt;&lt;![CDATA[new java.util.Date()]]&gt;&lt;/defaultValueExpression&gt;
      &lt;/parameter&gt;
      &lt;queryString&gt;
          &lt;![CDATA[SELECT
       BusinessUnit AS BusinessUnit,
       CallStart AS CallStart,
       CallEnd AS CallEnd,
       CallTakenBy AS CallTakenBy,
       CalledDate AS CalledDate,
       CallPersonName AS CallPersonName,
       Duration AS Duration
  FROM
      crmcalldetail
  WHERE CalledDate &gt; $P{dateFrom} AND CalledDate &lt; $P{dateTo}
  ORDER BY BusinessUnit]]&gt;
      &lt;/queryString&gt;
      &lt;field name="BusinessUnit" class="java.lang.String"/&gt;
      &lt;field name="CallStart" class="java.sql.Time"/&gt;
      &lt;field name="CallEnd" class="java.sql.Time"/&gt;
      &lt;field name="CallTakenBy" class="java.lang.String"/&gt;
      &lt;field name="CalledDate" class="java.sql.Date"/&gt;
      &lt;field name="CallPersonName" class="java.lang.String"/&gt;
      &lt;field name="Duration" class="java.lang.Integer"/&gt;
      &lt;variable name="duration_sum" class="java.lang.Integer" resetType="Group" resetGroup="BusinessUnit" calculation="Sum"&gt;
          &lt;variableExpression&gt;&lt;![CDATA[$F{Duration}]]&gt;&lt;/variableExpression&gt;
      &lt;/variable&gt;
      &lt;variable name="duration_tot" class="java.lang.Integer" calculation="Sum"&gt;
          &lt;variableExpression&gt;&lt;![CDATA[$F{Duration}]]&gt;&lt;/variableExpression&gt;
      &lt;/variable&gt;
      &lt;group name="BusinessUnit"&gt;
          &lt;groupExpression&gt;&lt;![CDATA[$F{BusinessUnit}]]&gt;&lt;/groupExpression&gt;
          &lt;groupHeader&gt;
              &lt;band height="37"&gt;
                  &lt;frame&gt;
                      &lt;reportElement uuid="e53feaa2-4fce-4233-873c-4c5b1d87bd09" mode="Opaque" x="0" y="7" width="555" height="24" forecolor="#B89F7D" backcolor="#000000"/&gt;
                      &lt;textField isStretchWithOverflow="true"&gt;
                          &lt;reportElement uuid="8a34951d-becf-4676-801f-1cbfd81518b9" style="SubTitle" isPrintRepeatedValues="false" x="2" y="0" width="479" height="24" forecolor="#FF6600"/&gt;
                          &lt;textElement&gt;
                              &lt;font isBold="false"/&gt;
                          &lt;/textElement&gt;
                          &lt;textFieldExpression&gt;&lt;![CDATA[$F{BusinessUnit}]]&gt;&lt;/textFieldExpression&gt;
                      &lt;/textField&gt;
                  &lt;/frame&gt;
              &lt;/band&gt;
          &lt;/groupHeader&gt;
          &lt;groupFooter&gt;
              &lt;band height="26"&gt;
                  &lt;textField pattern="###0"&gt;
                      &lt;reportElement uuid="6a2e9f4f-bc0c-4deb-a861-9d30221cc566" x="481" y="9" width="48" height="15" forecolor="#FF3300"/&gt;
                      &lt;textElement textAlignment="Right"&gt;
                          &lt;font size="11" isBold="true" isUnderline="true"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$V{duration_sum}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
              &lt;/band&gt;
          &lt;/groupFooter&gt;
      &lt;/group&gt;
      &lt;background&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height="194" splitType="Stretch"&gt;
              &lt;image&gt;
                  &lt;reportElement uuid="97326b0b-4f59-45fa-bab1-82019da4a8f6" x="456" y="0" width="99" height="117"/&gt;
                  &lt;imageExpression&gt;&lt;![CDATA["cherry.jpg"]]&gt;&lt;/imageExpression&gt;
              &lt;/image&gt;
              &lt;frame&gt;
                  &lt;reportElement uuid="643a9f59-1f72-4def-a457-944bebb9111a" mode="Opaque" x="0" y="0" width="451" height="95" backcolor="#000000"/&gt;
                  &lt;staticText&gt;
                      &lt;reportElement uuid="c2fa629b-41e3-4ea6-ba69-458367963aac" style="Title" x="0" y="0" width="451" height="66"/&gt;
                      &lt;textElement&gt;
                          &lt;font isBold="false"/&gt;
                      &lt;/textElement&gt;
                      &lt;text&gt;&lt;![CDATA[Call Tracker Report]]&gt;&lt;/text&gt;
                  &lt;/staticText&gt;
                  &lt;staticText&gt;
                      &lt;reportElement uuid="a01a3826-af92-4941-ab2b-41cb1da3f9a6" style="SubTitle" x="157" y="66" width="249" height="29"/&gt;
                      &lt;textElement&gt;
                          &lt;font size="22" isBold="false"/&gt;
                      &lt;/textElement&gt;
                      &lt;text&gt;&lt;![CDATA[X-ONT Software (Ltd) Ltd]]&gt;&lt;/text&gt;
                  &lt;/staticText&gt;
              &lt;/frame&gt;
              &lt;frame&gt;
                  &lt;reportElement uuid="3d131a89-bb0f-4d0a-8085-85ef01af5910" mode="Opaque" x="0" y="96" width="451" height="21" forecolor="#000000" backcolor="#CC0000"/&gt;
                  &lt;textField pattern="EEEEE dd MMMMM yyyy"&gt;
                      &lt;reportElement uuid="580213d0-b1fc-4725-b311-c89e960a4ce0" x="303" y="1" width="144" height="20" forecolor="#FFFFFF"/&gt;
                      &lt;textElement textAlignment="Right"&gt;
                          &lt;font size="12"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[new java.util.Date()]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
              &lt;/frame&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="99c5e0a7-c15a-4072-b1ff-8b83a347f161" x="2" y="121" width="74" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Customer  ]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="cfe1a411-8270-4b02-947c-a699ff86c385" x="205" y="121" width="56" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Called By]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="bc57e2ae-3f68-4376-9d87-97c2c984a679" x="363" y="121" width="100" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Called Taken By]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="ba3f773c-9145-4e37-9ffe-70dc2e1acefd" x="204" y="143" width="65" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Report Type]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="948a2d75-1716-414e-b2e9-4b3ab44382ca" x="2" y="143" width="74" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Group Type]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="1eb88a37-9aa5-4368-8e4d-fcf02b95a6bb" x="85" y="121" width="67" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[ALL]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="b4d0efcf-fc10-4cd7-a946-786ee3d7865f" x="284" y="121" width="48" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[ALL]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="b4d0efcf-fc10-4cd7-a946-786ee3d7865f" x="473" y="121" width="48" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[ALL]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="37f5f2ec-f1c2-4837-b0bb-3b4dfde170d0" x="282" y="143" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[Detail]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="2be6789f-c973-417f-b32a-44822d417a98" x="84" y="143" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;text&gt;&lt;![CDATA[CustomerCalled]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="f40bab96-7309-41d1-a874-f2b99a9f16bc" x="2" y="165" width="74" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Date From]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="692e0148-3beb-4c22-b193-36e37254421e" x="205" y="167" width="63" height="20"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Date To]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField pattern="yyyy-MM-dd"&gt;
                  &lt;reportElement uuid="d0e85180-f225-4a6a-ae0d-7927da8212db" x="84" y="167" width="100" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{dateFrom}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField pattern="yyyy-MM-dd" isBlankWhenNull="true"&gt;
                  &lt;reportElement uuid="43ea7f44-ebfd-459e-a9c1-dbbe89168f0b" x="282" y="167" width="83" height="20"/&gt;
                  &lt;textElement/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{dateTo}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;pageHeader&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/pageHeader&gt;
      &lt;columnHeader&gt;
          &lt;band height="29" splitType="Stretch"&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="3284a455-7c75-40df-838b-34ec9fc5489e" style="Column header" x="297" y="5" width="76" height="18" forecolor="#000000"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Satrt]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="c41f01fd-3417-4cd2-a8d9-296069637903" style="Column header" x="384" y="5" width="67" height="18" forecolor="#000000"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[End]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="95576a18-8fe1-4d57-bef4-c3361481475c" style="Column header" x="107" y="5" width="92" height="18" forecolor="#000000"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[CallTakenBy]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="1ff784cc-a3ab-4f0e-931d-6924a48e5299" style="Column header" x="199" y="5" width="92" height="18" forecolor="#000000"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Date]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="4c7fd897-81e9-4711-99d1-de26c6f86a47" style="Column header" x="2" y="4" width="92" height="18" forecolor="#000000"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Called By]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="6033972d-b1d4-4154-9df2-24cba2a403dd" style="Column header" x="471" y="5" width="58" height="18" forecolor="#000000"/&gt;
                  &lt;textElement&gt;
                      &lt;font isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Duration]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height="18" splitType="Stretch"&gt;
              &lt;frame&gt;
                  &lt;reportElement uuid="ccc5fd50-0293-441b-b783-e95672e038a1" style="Row" mode="Opaque" x="0" y="0" width="555" height="18"/&gt;
                  &lt;textField isStretchWithOverflow="true" pattern="h.mm a"&gt;
                      &lt;reportElement uuid="a317f374-5796-43c4-99d6-10a3af7ee4db" style="Detail" positionType="Float" x="297" y="0" width="92" height="18"/&gt;
                      &lt;textElement&gt;
                          &lt;font size="14"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{CallStart}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField isStretchWithOverflow="true"&gt;
                      &lt;reportElement uuid="442d310e-4052-4ccb-96e0-636b268a55e7" style="Detail" positionType="Float" x="107" y="0" width="92" height="18"/&gt;
                      &lt;textElement&gt;
                          &lt;font size="14"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{CallTakenBy}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField isStretchWithOverflow="true" pattern="dd-MMM-yy"&gt;
                      &lt;reportElement uuid="74fca3b3-8be6-40b5-8556-eddf64295fd3" style="Detail" positionType="Float" x="199" y="0" width="92" height="18"/&gt;
                      &lt;textElement&gt;
                          &lt;font size="14"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{CalledDate}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField isStretchWithOverflow="true"&gt;
                      &lt;reportElement uuid="2dcf814d-af5b-4aa9-9fb3-a70948156bf3" style="Detail" positionType="Float" x="2" y="0" width="92" height="18"/&gt;
                      &lt;textElement&gt;
                          &lt;font size="14"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{CallPersonName}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField isStretchWithOverflow="true" pattern="###0"&gt;
                      &lt;reportElement uuid="b0db0027-f5f2-4126-a400-16e0b5a1d0ba" style="Detail" positionType="Float" x="481" y="0" width="48" height="18"/&gt;
                      &lt;textElement textAlignment="Right"&gt;
                          &lt;font size="14"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{Duration}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField isStretchWithOverflow="true" pattern="h.mm a"&gt;
                      &lt;reportElement uuid="89479c74-1d4f-4e50-bc8c-3577a6081433" style="Detail" positionType="Float" x="389" y="0" width="92" height="18"/&gt;
                      &lt;textElement&gt;
                          &lt;font size="14"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[$F{CallEnd}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
              &lt;/frame&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
      &lt;columnFooter&gt;
          &lt;band height="35" splitType="Stretch"&gt;
              &lt;line&gt;
                  &lt;reportElement uuid="4de509a0-2c1a-494e-80ba-26495de7e795" positionType="FixRelativeToBottom" x="0" y="3" width="555" height="1"/&gt;
                  &lt;graphicElement&gt;
                      &lt;pen lineWidth="0.5" lineColor="#999999"/&gt;
                  &lt;/graphicElement&gt;
              &lt;/line&gt;
              &lt;textField pattern="###0" isBlankWhenNull="true"&gt;
                  &lt;reportElement uuid="daab26a1-72f8-48bb-aea6-3265520641c2" x="458" y="4" width="71" height="20" forecolor="#990000"/&gt;
                  &lt;textElement textAlignment="Right"&gt;
                      &lt;font size="14" isBold="true" isUnderline="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$V{duration_tot}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement uuid="aecf8666-74fc-4ff3-8a1b-3a4e548d5d69" x="307" y="4" width="149" height="20" forecolor="#990000"/&gt;
                  &lt;textElement&gt;
                      &lt;font size="12" isBold="true"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Net Total Minutes]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/columnFooter&gt;
      &lt;pageFooter&gt;
          &lt;band height="25" splitType="Stretch"&gt;
              &lt;frame&gt;
                  &lt;reportElement uuid="57d220fb-781d-4991-a9e4-1b7006fea841" mode="Opaque" x="0" y="1" width="555" height="24" forecolor="#D0B48E" backcolor="#000000"/&gt;
                  &lt;textField evaluationTime="Report"&gt;
                      &lt;reportElement uuid="59953dfc-6b53-4411-a003-74cd5d551432" style="Column header" x="513" y="0" width="40" height="20" forecolor="#FFFFFF"/&gt;
                      &lt;textElement verticalAlignment="Middle"&gt;
                          &lt;font size="10" isBold="false"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[" " + $V{PAGE_NUMBER}]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField&gt;
                      &lt;reportElement uuid="8a2577bd-ce1b-47e5-87bf-74e7627e89a3" style="Column header" x="433" y="0" width="80" height="20" forecolor="#FFFFFF"/&gt;
                      &lt;textElement textAlignment="Right" verticalAlignment="Middle"&gt;
                          &lt;font size="10" isBold="false"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
                  &lt;textField pattern="EEEEE dd MMMMM yyyy"&gt;
                      &lt;reportElement uuid="c36f2f3c-cae1-4e1a-889e-37c3a5862d5f" style="Column header" x="2" y="1" width="197" height="20" forecolor="#FFFFFF"/&gt;
                      &lt;textElement verticalAlignment="Middle"&gt;
                          &lt;font size="10" isBold="false"/&gt;
                      &lt;/textElement&gt;
                      &lt;textFieldExpression&gt;&lt;![CDATA[new java.util.Date()]]&gt;&lt;/textFieldExpression&gt;
                  &lt;/textField&gt;
              &lt;/frame&gt;
          &lt;/band&gt;
      &lt;/pageFooter&gt;
      &lt;summary&gt;
          &lt;band splitType="Stretch"/&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>
  
  <p>This is what I run:</p>
  
  <pre><code>     JasperReport jasperReport = null;
          JasperDesign jasperDesign = null;
          Map parameters = new HashMap();
          parameters.put("dateFrom", dateFrom);
          parameters.put("dateTo", dateTo);
          String path = getServletContext().getRealPath("/WEB-INF/");
          System.out.println("==Path==" + path);
          String filePath = path+"\\classes\\com\\crmreport\\controller\\BusinessUnitDetail.jrxml";
           System.out.println("==filePath==" + filePath);
          jasperDesign = JRXmlLoader.load(filePath);
          jasperReport = JasperCompileManager.compileReport(jasperDesign);
          byte[] byteStream = JasperRunManager.runReportToPdf(jasperReport, parameters, new JREmptyDataSource());
          OutputStream outStream = response.getOutputStream();
          response.setHeader("Content-Disposition","inline, filename=BusinessUnitDetail.pdf");
          response.setContentType("application/pdf");
          response.setContentLength(byteStream.length);
          outStream.write(byteStream,0,byteStream.length);
  </code></pre>
  
  <p>What causes these errors?  I googled it, it say error is on XML.  But it worked fined using iReport.  </p>