jsp - XML Validation: Invalid content was found starting with element 'jr:table' -


i have developed pdf report using ireport-5.6.0 . in ireport works fine. have created .jsp file in eclipse. when try run program in eclipse,i following exception:

severe: parse error @ line 130 column 227: cvc-complex-type.2.4.a: invalid content found starting element 'jr:table'. 1 of '{"http://jasperreports.sourceforge.net/jasperreports":component}' expected.

please me. in advance.

pdf1.jsp

<%@ page language="java" contenttype="text/html; charset=iso-8859-1" pageencoding="iso-8859-1"%>  <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <%@page import="net.sf.jasperreports.engine.design.jrdesignquery"%> <%@page import="net.sf.jasperreports.engine.xml.jrxmlloader"%> <%@page import="net.sf.jasperreports.engine.design.jasperdesign"%> <%@page import="net.sf.jasperreports.view.jasperviewer"%> <%@ page import="net.sf.jasperreports.engine.*" %> <%@ page import="java.io.file"%> <%@ page import="java.io.fileinputstream" %> <%@ page import="java.io.filenotfoundexception" %> <%@ page import="java.io.inputstream" %> <%@ page import="java.sql.connection"%> <%@ page import="java.sql.drivermanager" %> <%@ page import="java.sql.sqlexception"%> <head> <meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1″> <title>insert title here</title> </head> <body> <% connection conn=null; try { class.forname("oracle.jdbc.driver.oracledriver"); conn = drivermanager.getconnection("jdbc:oracle:thin:@192.168.1.2:1521:orcl", "username",   "password");  string report="c:\\users\\admin\\attendance.jrxml";  jasperreport jasperreport=jaspercompilemanager.compilereport(report); jasperprint jp=jasperfillmanager.fillreport(jasperreport, null,conn); jasperviewer.viewreport(jp);  } catch(exception e) { out.println(e); }  %> </body> </html> 

attendance.jrxml:

<?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="attendance" language="groovy" pagewidth="1224" pageheight="595" orientation="landscape" columnwidth="1184" 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="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>   <conditionalstyle>   <conditionexpression><![cdata[new boolean($v{report_count}.intvalue()%2==0)]]></conditionexpression>   <style backcolor="#eff7ff"/>   </conditionalstyle>   </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>   <conditionalstyle>   <conditionexpression><![cdata[new boolean($v{report_count}.intvalue()%2==0)]]></conditionexpression>   <style backcolor="#eff7ff"/>   </conditionalstyle>   </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>   <conditionalstyle>   <conditionexpression><![cdata[new boolean($v{report_count}.intvalue()%2==0)]]></conditionexpression>   <style backcolor="#eff7ff"/>   </conditionalstyle>   </style>   <subdataset name="new dataset 1" >   <querystring language="sql">   <![cdata[select empcode,empname, punchdate,login, brkout, brkin,logout,  round((to_date(login ,'hh24:mi')-to_date(starttime,'hh24:mi')) * 24 * 60)late,  round((to_date(endtime,'hh24:mi')-to_date(logout,'hh24:mi')) * 24 * 60) early, round((to_date(brkin,'hh24:mi')-to_date(brkout,'hh24:mi')) * 24 * 60) brk,round(( decode( to_date(login , 'hh24:mi') - to_date (brkout , 'hh24:mi') , '' ,0,to_date(brkout , 'hh24:mi') - to_date (login , 'hh24:mi') )  + decode( to_date(logout , 'hh24:mi') - to_date (brkin , 'hh24:mi'), '',0,  to_date(logout , 'hh24:mi') - to_date (brkin , 'hh24:mi') ) ) * 24 ) tothrs,uniform,remarks ( select a.empcode,b.empname,a.punchdate,  to_char( min (case when a.status ='in' a.punchtime else null end) , 'hh24:mi' ) login,  to_char( ( case when ( min (case when a.status ='in' a.punchtime  else null end)) =   ( max (case when a.status ='in' a.punchtime  else null end))  null else max (case when a.status ='in' a.punchtime  else null end)  end ),'hh24:mi' ) brkin,  to_char( min (case when a.status ='out' a.punchtime  else null end) , 'hh24:mi' ) brkout,to_char( ( case when ( min (case when a.status ='out' a.punchtime  else null end)) =  ( max (case when a.status ='out' a.punchtime  else null end))  null else max (case when a.status ='out' a.punchtime  else null end)end ),'hh24:mi' ) logout, to_char( c.starttime ,'hh24:mi') starttime ,  to_char( c.endtime ,'hh24:mi') endtime,a.uniform,a.remarks peco.memployeetrack a,peco.memployee b, peco.mshift c  a.punchdate  = '01-oct-2014'  , a.empcode=b.empcode , b.shiftcode=c.shiftcode group a.empcode,b.empname,a.punchdate,c.starttime,c.endtime,a.uniform,a.remarks )  union select empcode,empname, null aspunchdate, '' login , '' brkout, '' brkin, '' logout, 0late,  0 , 0 brk , 0 tothrs,'','' peco.memployee    empcode not in  (select empcode peco.memployeetrack punchdate = '01-oct-2014'  , ourbranchcode = 'ho')   , ourbranchcode='ho'  , isactive=0 , empcode <> 'none' order punchdate , empname]]>   </querystring>   <field name="empcode" class="java.lang.string"/>   <field name="empname" class="java.lang.string"/>   <field name="punchdate" class="java.sql.timestamp"/>   <field name="login" class="java.lang.string"/>   <field name="brkout" class="java.lang.string"/>   <field name="brkin" class="java.lang.string"/>   <field name="logout" class="java.lang.string"/>   <field name="late" class="java.math.bigdecimal"/>   <field name="early" class="java.math.bigdecimal"/>   <field name="brk" class="java.math.bigdecimal"/>   <field name="tothrs" class="java.math.bigdecimal"/>   <field name="uniform" class="java.lang.string"/>   <field name="remarks" class="java.lang.string"/>   </subdataset>   <querystring>   <![cdata[select empcode,empname, punchdate,login, brkout, brkin,logout,  round((to_date(login ,'hh24:mi')-to_date(starttime,'hh24:mi')) * 24 * 60)late,  round((to_date(endtime,'hh24:mi')-to_date(logout,'hh24:mi')) * 24 * 60) early, round((to_date(brkin,'hh24:mi')-to_date(brkout,'hh24:mi')) * 24 * 60) brk,round(( decode( to_date(login , 'hh24:mi') - to_date (brkout , 'hh24:mi') , '' ,0,to_date(brkout , 'hh24:mi') - to_date (login , 'hh24:mi') )  + decode( to_date(logout , 'hh24:mi') - to_date (brkin , 'hh24:mi'), '',0,  to_date(logout , 'hh24:mi') - to_date (brkin , 'hh24:mi') ) ) * 24 ) tothrs,uniform,remarks ( select a.empcode,b.empname,a.punchdate,  to_char( min (case when a.status ='in' a.punchtime else null end) , 'hh24:mi' ) login,  to_char( ( case when ( min (case when a.status ='in' a.punchtime  else null end)) =   ( max (case when a.status ='in' a.punchtime  else null end))  null else max (case when a.status ='in' a.punchtime  else null end)  end ),'hh24:mi' ) brkin,  to_char( min (case when a.status ='out' a.punchtime  else null end) , 'hh24:mi' ) brkout,to_char( ( case when ( min (case when a.status ='out' a.punchtime  else null end)) =  ( max (case when a.status ='out' a.punchtime  else null end))  null else max (case when a.status ='out' a.punchtime  else null end)end ),'hh24:mi' ) logout, to_char( c.starttime ,'hh24:mi') starttime ,  to_char( c.endtime ,'hh24:mi') endtime,a.uniform,a.remarks peco.memployeetrack a,peco.memployee b, peco.mshift c  a.punchdate  = '01-oct-2014'  , a.empcode=b.empcode , b.shiftcode=c.shiftcode group a.empcode,b.empname,a.punchdate,c.starttime,c.endtime,a.uniform,a.remarks )  union select empcode,empname, null aspunchdate, '' login , '' brkout, '' brkin, '' logout, 0late,  0 , 0 brk , 0 tothrs,'','' peco.memployee    empcode not in  (select empcode peco.memployeetrack punchdate = '01-oct-2014'  , ourbranchcode = 'ho')   , ourbranchcode='ho'  , isactive=0 , empcode <> 'none' order punchdate , empname]]>   </querystring>   <field name="empcode" class="java.lang.string"/>   <field name="empname" class="java.lang.string"/>   <field name="punchdate" class="java.sql.timestamp"/>   <field name="login" class="java.lang.string"/>   <field name="brkout" class="java.lang.string"/>   <field name="brkin" class="java.lang.string"/>   <field name="logout" class="java.lang.string"/>   <field name="late" class="java.math.bigdecimal"/>   <field name="early" class="java.math.bigdecimal"/>   <field name="brk" class="java.math.bigdecimal"/>   <field name="tothrs" class="java.math.bigdecimal"/>   <field name="uniform" class="java.lang.string"/>   <field name="remarks" class="java.lang.string"/>   <background>   <band splittype="stretch"/>   </background>   <title>   <band height="79" splittype="stretch"/>   </title>   <pageheader>   <band height="35" splittype="stretch"/>   </pageheader>   <columnheader>   <band height="50" splittype="stretch"/>   </columnheader>   <detail>   <band height="14" splittype="stretch">   <componentelement>   <reportelement key="table 2" style="table 2" x="0" y="0" width="844" height="14" >   <printwhenexpression><![cdata[$v{report_count} == 1]]></printwhenexpression>   </reportelement>   <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="new dataset 1" >   <connectionexpression><![cdata[$p{report_connection}]]></connectionexpression>   </datasetrun>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[empcode]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{empcode}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[empname]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{empname}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[punchdate]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{punchdate}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[login]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{login}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[brkout]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{brkout}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[brkin]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{brkin}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[logout]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{logout}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[late]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{late}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[early]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{early}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[brk]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{brk}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[tothrs]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{tothrs}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30" />   <text><![cdata[uniform]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20" />   <textfieldexpression><![cdata[$f{uniform}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   <jr:column width="90" >   <jr:columnheader style="table 2_ch" height="30">   <statictext>   <reportelement x="0" y="0" width="90" height="30"/>   <text><![cdata[remarks]]></text>   </statictext>   </jr:columnheader>   <jr:columnfooter style="table 2_ch" height="30"/>   <jr:detailcell style="table 2_td" height="20">   <textfield isstretchwithoverflow="true" isblankwhennull="true">   <reportelement x="0" y="0" width="90" height="20"/>   <textfieldexpression><![cdata[$f{remarks}]]></textfieldexpression>   </textfield>   </jr:detailcell>   </jr:column>   </jr:table>   </componentelement>   </band>   </detail> </jasperreport> 


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -