정은이
2001-08-06 16:59:24
0
3072

오류 좀 잡아줘요........ ㅡ.ㅡ


약국의 환자와 약사를 삽입하는 소스인데 에러가 뜨네요... 아래는 소스이고요... 고수님들.. 제발 급해서요... 좀 봐줘잉~~~ ^^ <%@ page contentType="text/html;charset=euc-kr" import="java.sql.*" %> 가입처리결과 <% Class.forName("oracle.jdbc.driver.OracleDriver"); Connection insertConn = DriverManager.getConnection("jdbc:oracle:thin:@203.247.239.17:1521:EDU","donor","can2576"); %> <% PreparedStatement pstmt = null; int pati_id = Integer.parseInt(request.getParameter("pati_id2")); String pati_name = request.getParameter("pati_name2"); String pati_dis = request.getParameter("pati_disease2"); int pati_age = Integer.parseInt(request.getParameter("pati_age2")); String jsql = "INSERT INTO PATIENT(PA_ID, NAME, DISEASE, AGE) VALUES (?,?,?,?)"; pstmt = insertConn.prepareStatement(jsql); pstmt.setInt(1, pati_id); pstmt.setString(2, pati_name); pstmt.setString(3, pati_dis); pstmt.setInt(4, pati_age); try { pstmt.executeUpdate(); %>
이 페이지는 삽입된 결과를 보여줍니다..
<%=pati_name %>님 삽입 되었습니다
환자번호 : <%=pati_id%>
환자이름 : <%=pati_name%>
병 명 : <%=pati_dis%>
환자나이 : <%=pati_age%>
<% } catch (SQLException e) { %>
환자가 잘못입력되었습니다. 다시 확인하시고 입력해주세요~~~~~~
<% } %> <% PreparedStatement pstmt1 = null; int histo_id = Integer.parseInt(request.getParameter("histo_id2")); String histo_name = request.getParameter("histo_name2"); int histo_age = Integer.parseInt(request.getParameter("histo_age2")); String jsql1 = "INSERT INTO HISTORICAL(HIS_ID, NAME2, AGE2) VALUES (?,?,?)"; pstmt1 = insertConn.prepareStatement(jsql1); pstmt1.setInt(1, histo_id); pstmt1.setString(2, histo_name); pstmt1.setInt(3, histo_age); try { pstmt1.executeUpdate(); %>

<%=histo_name %>님이 조제하셨습니다
약사번호 : <%=histo_id%>
약사이름 : <%=histo_name%>
약사나이 : <%=histo_age%>
<% } catch (SQLException e) { %>
약사가 잘못입력되었습니다. 다시 확인하시고 입력해주세요~~~~~~ <% } %> 여긴 에러 부분이에요... 도무지 모르겠어요... T.T javax.servlet.ServletException: null at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at javax.servlet.ServletException.(ServletException.java:161) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386) at drugstore._0002fdrugstore_0002finsert_0002ejspinsert_jsp_20._jspService(_0002fdrugstore_0002finsert_0002ejspinsert_jsp_20.java:207) at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(Compiled Code) at org.apache.jasper.runtime.JspServlet.serviceJspFile(Compiled Code) at org.apache.jasper.runtime.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled Code) at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) at java.lang.Thread.run(Compiled Code) Root cause: java.lang.NumberFormatException: null at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled Code) at java.lang.Exception.(Compiled Code) at java.lang.RuntimeException.(RuntimeException.java:47) at java.lang.IllegalArgumentException.(IllegalArgumentException.java:43) at java.lang.NumberFormatException.(NumberFormatException.java:43) at java.lang.Integer.parseInt(Compiled Code) at java.lang.Integer.parseInt(Compiled Code) at drugstore._0002fdrugstore_0002finsert_0002ejspinsert_jsp_20._jspService(_0002fdrugstore_0002finsert_0002ejspinsert_jsp_20.java:76) at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(Compiled Code) at org.apache.jasper.runtime.JspServlet.serviceJspFile(Compiled Code) at org.apache.jasper.runtime.JspServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled Code) at org.apache.tomcat.service.TcpConnectionThread.run(Compiled Code) at java.lang.Thread.run(Compiled Code)
0
  • 답변 0

  • 로그인을 하시면 답변을 등록할 수 있습니다.