Hi EveryOne

I have a problem with creating reports by using servlets and JSP. Here i have encountered an exception. Please solve my query... Below is my exception....

My CODE is HERE
****************
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionD ataSource;

import org.xml.sax.SAXParseException;


public class Report_Paid_Fees_List_Action
{
//public static void main(String[] args)
public void getfeePaidList()
{
//Connection con = null;

List qryList=null;
PreparedStatement pst = null;
ResultSet rs = null;
List tempList = new ArrayList();

List list = null;
String dirName="E:/Sulthan/Sulthan_Netbeans_WorkSpace/New_Report_Project/web/WEB-INF/";
System.out.println("Fees Paid List Called");

try
{
Class.forName("com.mysql.jdbc.Driver").newInstance ();
Connection con=DriverManager.getConnection("jdbc:mysql:///sims","root","root");
System.out.println("Connceted Successfully");

String qry = "select admission_number, student_first_name, seat_category, semester, department, year, totalamount, paid_amount, paid_date from pay_fees";
pst = con.prepareStatement(qry);
rs = pst.executeQuery();
System.out.println("Query-->"+qry);

while(rs.next())
{
Report_Paid_Fees_Bean rpfb = new Report_Paid_Fees_Bean();

rpfb.setAdmission_number(rs.getString("admission_n umber"));
rpfb.setStudent_first_name(rs.getString("student_f irst_name"));
rpfb.setSeat_category(rs.getString("seat_category" ));
rpfb.setSemester(rs.getString("semester"));
rpfb.setDepartment(rs.getString("department"));
rpfb.setYear(rs.getString("year"));
rpfb.setTotalamount(rs.getString("totalamount"));
rpfb.setPaid_amount(rs.getString("paid_amount"));
rpfb.setPaid_date(rs.getString("paid_date"));

tempList.add(rpfb);
}

System.out.println("Simple Query-->"+tempList);

JasperReport jasperReport;
JasperPrint jasperPrint;

JasperCompileManager.compileReportToFile(dirName+" fees_paid_list.jrxml");

//Report_Paid_Fees_List_Action classref = new Report_Paid_Fees_List_Action();
//list = tempList;
//System.out.println("LIST****"+list);
JRDataSource jrDataSource =new JRBeanCollectionDataSource(tempList);
Map parameters = new HashMap();

parameters.put("p1", "Admission Number");
parameters.put("p2", "Student Name");
parameters.put("p3", "Seat Category");
parameters.put("p4", "Semester");
parameters.put("p5", "Department");
parameters.put("p6", "Year");
parameters.put("p7", "Total Amount");
parameters.put("p8", "Paid Amount");
parameters.put("p9", "Paid Date");

JasperFillManager.fillReportToFile(dirName+"fees_p aid_list.jasper",parameters,jrDataSource);
JasperExportManager.exportReportToPdfFile(dirName+ "fees_paid_list.jrprint");

System.out.println("End of Report File");

}
catch (Exception e)
{
e.printStackTrace();
}
}

}

**************


import java.io.*;
import java.net.*;

import javax.servlet.*;
import javax.servlet.http.*;

public class Report_Fees_Detail_Action_Servlet extends HttpServlet
{

protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{


String feeParam = request.getParameter("feesHDNParam");
System.out.println("GET PARAMETER--->"+feeParam);

if(feeParam != null)
{
System.out.println("Paid Fees List Action Called");
Report_Paid_Fees_List_Action ref = new Report_Paid_Fees_List_Action();
ref.getfeePaidList();
}
else
{
Report_Fees_Balance_Student_List_Action ref1 = new Report_Fees_Balance_Student_List_Action();
ref1.getfeeBalanceList();
}
}

// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/** Returns a short description of the servlet.
*/
public String getServletInfo() {
return "Short description";
}
// </editor-fold>
}

****************

package Bean;


public class Report_Paid_Fees_Bean
{
private String admission_number;
private String student_first_name;
private String student_last_name;
private String seat_category;
private String semester;
private String course;
private String last_date;
private String balance;
private String balance_date;
private String department;
private String year;
private String totalamount;
private String paid_amount;
private String paid_date;

public String getAdmission_number() {
return admission_number;
}

public void setAdmission_number(String admission_number) {
this.admission_number = admission_number;
}

public String getStudent_first_name() {
return student_first_name;
}

public void setStudent_first_name(String student_first_name) {
this.student_first_name = student_first_name;
}

public String getSeat_category() {
return seat_category;
}

public void setSeat_category(String seat_category) {
this.seat_category = seat_category;
}

public String getSemester() {
return semester;
}

public void setSemester(String semester) {
this.semester = semester;
}

public String getDepartment() {
return department;
}

public void setDepartment(String department) {
this.department = department;
}

public String getYear() {
return year;
}

public void setYear(String year) {
this.year = year;
}

public String getTotalamount() {
return totalamount;
}

public void setTotalamount(String totalamount) {
this.totalamount = totalamount;
}

public String getPaid_amount() {
return paid_amount;
}

public void setPaid_amount(String paid_amount) {
this.paid_amount = paid_amount;
}

public String getPaid_date() {
return paid_date;
}

public void setPaid_date(String paid_date) {
this.paid_date = paid_date;
}

public String getStudent_last_name() {
return student_last_name;
}

public void setStudent_last_name(String student_last_name) {
this.student_last_name = student_last_name;
}

public String getCourse() {
return course;
}

public void setCourse(String course) {
this.course = course;
}

public String getLast_date() {
return last_date;
}

public void setLast_date(String last_date) {
this.last_date = last_date;
}

public String getBalance() {
return balance;
}

public void setBalance(String balance) {
this.balance = balance;
}

public String getBalance_date() {
return balance_date;
}

public void setBalance_date(String balance_date) {
this.balance_date = balance_date;
}


}






Exception
********

Jun 27, 2008 5:49:42 PM org.apache.commons.digester.Digester fatalError
net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: Attribute "" bound to namespace "null" was already specified for element "jasperReport".
SEVERE: Parse Fatal Error at line 19 column 29: Attribute "" bound to namespace "null" was already specified for element "jasperReport".
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXM L(JRXmlLoader.java:243)
org.xml.sax.SAXParseException: Attribute "" bound to namespace "null" was already specified for element "jasperReport".
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXM L(JRXmlLoader.java:226)
at org.apache.xerces.util.ErrorHandlerWrapper.createS AXParseException(Unknown Source)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(J RXmlLoader.java:214)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalEr ror(Unknown Source)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(J RXmlLoader.java:168)
at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(J RXmlLoader.java:152)
at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReportToFile(JasperCompileManager.java:90)
at org.apache.xerces.impl.dtd.XMLNSDTDValidator.start NamespaceScope(Unknown Source)
at org.apache.jsp.logic_jsp._jspService(logic_jsp.jav a:118)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleS tartElement(Unknown Source)
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startEl ement(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.sc anStartElement(Unknown Source)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NS ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.xerces.parsers.DTDConfiguration.parse(U nknown Source)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.xerces.parsers.DTDConfiguration.parse(U nknown Source)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:368)
at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
at org.apache.commons.digester.Digester.parse(Digeste r.java:1647)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXM L(JRXmlLoader.java:239)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXM L(JRXmlLoader.java:226)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(J RXmlLoader.java:214)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(J RXmlLoader.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(J RXmlLoader.java:152)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReportToFile(JasperCompileManager.java:90)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.jsp.logic_jsp._jspService(logic_jsp.jav a:118)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:869)
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:664)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:527)
at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:332)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:314)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:264)
at java.lang.Thread.run(Thread.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
Caused by: org.xml.sax.SAXParseException: Attribute "" bound to namespace "null" was already specified for element "jasperReport".
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:252)
at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.commons.digester.Digester.parse(Digeste r.java:1647)
at org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:368)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXM L(JRXmlLoader.java:239)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:202)
... 29 more
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Jun 27, 2008 6:25:21 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started