日期:2014-05-20  浏览次数:20970 次

求大神帮助!!!
package readmission.file;
 
 
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;

import javax.servlet.*;

import validata.ValidataNumber;

import java.util.* ;
import java.io.* ;
import include.nseer_db.*;
import include.nseer_cookie.*;
import include.operateDB.CdefineUpdate;

public class outincount_ok extends HttpServlet{

public synchronized void service(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException{
HttpSession dbSession=request.getSession();
JspFactory _jspxFactory=JspFactory.getDefaultFactory();
PageContext pageContext = _jspxFactory.getPageContext(this,request,response,"",true,8192,true);
ServletContext dbApplication=dbSession.getServletContext();
ServletContext application;
HttpSession session=request.getSession();
nseer_db_backup1 readmission_db=new nseer_db_backup1(dbApplication);
nseer_db_backup1 finance_db=new nseer_db_backup1(dbApplication);
ValidataNumber validata=new ValidataNumber();
counter count=new counter(dbApplication);
String sql3="select * from readmission_patient";
ResultSet rs=readmission_db.executeQuery(sql3);
String start_time=request.getParameter("start_time");
String end_time=request.getParameter("end_time");
String[] medicalnum=new String[100];
int lcount=0;
try{
if(readmission_db.conn((String)dbSession.getAttribute("unit_db_name")))
{
int yes1=end_time.compareTo(start_time);
if(yes1>0)
{
rs.next();
String register_in_time=rs.getString("register_in_time");
System.out.println("register_in_time");
int yes2=register_in_time.compareTo(start_time);
if(yes2>=0)
{
int yes3=register_in_time.compareTo(end_time);
while(yes3<=0)
{
medicalnum[lcount]=rs.getString("mediacl_num");
lcount++;
System.out.println("mediacl_num"+lcount);
rs.next();
rs.getString("register_in_time");
yes3=register_in_time.compareTo(end_time);
}
//String sql = "insert into readmission_patient(medical_num,hospital_num,name,sex,age,tel,card,address,state,anamnesis,remarks1,sections,bunk_num,remarks2,register,register_in_time,register_out_time) values ('"
// +medical_num+"','"+hospital_num+"','"+name+"','"+sex+"','"+age+"','"+tel+"','"+card+"','"+address+"','"+state+"','"+anamnesis+"','"+remarks1+"','"+sections+"','"+bunk_num+"','"+remarks2+"','"+register+"','"+register_in_time+"','"+register_out_time+"','"+"')";
response.sendRedirect("readmission/file/outincount_ok.jsp");
}
}
else
response.sendRedirect("readmission/file/outincount_not_ok.jsp");
}
else
response.sendRedirect("readmission/file/outincount_not_ok.jsp");
readmission_db.close();
  }catch (Exception ex){
  ex.printStackTrace();
  }
  }

运行到ResultSet rs=readmission_db.executeQuery(sql3);报错就不往下执行了!
报错为:at include.nseer_db.nseer_db_backup1.executeQuery(nseer_db_backup1.java:100)
at readmission.file.outincount_ok.service(outincount_ok.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at include.anti_repeat_submit.SubmitFilter.doFilter(SubmitFilter.java:85)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)