First of all, thanks for your reply.

I thought we need to close the resultset before re-using it for another
query??

kim.

----- Original Message -----
From: Ritu Kamboj <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 03, 2000 12:49 PM
Subject: Re: General Error problem in jdk1.3


> this  could  be the reason  b'coj u r closing resultset  object twice in
> your program........
> u actually close resultset  object  before closing connection and
statement
> object
> at the  end of the program not  earlier...
>
>
>
>
> Kim <[EMAIL PROTECTED]> on 07/03/2000 05:23:55 AM
>
> Please respond to A mailing list about Java Server Pages specification and
>       reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Kamboj Ritu-SWD-ITIL-UB/Itilmail)
>
> Subject:  Re: General Error problem in jdk1.3
>
>
>
>
> Something else to add:
>
> The error comes from closing the connection.
> I face the same problem in my other jsp's as well.
>
> Could someone please educate me on closing a connection perhaps??
>
> ----- Original Message -----
> From: Kim <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, July 03, 2000 11:58 AM
> Subject: General Error problem in jdk1.3
>
>
> > I get this error on & off after moving from jdk1.2.2 to jdk1.3:
> >
> > java.sql.SQLException: General error
> >  at sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(JdbcOdbc.java:6160)
> >  at sun.jdbc.odbc.JdbcOdbc.SQLFreeEnv(JdbcOdbc.java:2742)
> >  at
sun.jdbc.odbc.JdbcOdbcDriver.closeConnection(JdbcOdbcDriver.java:838)
> >  at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:736)
> >  at
> >
>
_0002fpending_0002ejsppending_jsp_4._jspService(_0002fpending_0002ejsppendi
> n
> > g_jsp_4.java:187)
> >  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >  at
> >
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.j
> a
> > va:174)
> >  at
> org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
> >  at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >  at
> >
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503
> )
> >  at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> >  at
> >
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Http
> C
> > onnectionHandler.java:160)
> >  at
> >
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:33
> 8
> > )
> >  at java.lang.Thread.run(Thread.java:484)
> >
> > Can someone tell me why, please??
> > this is my jsp:
> >
> > <!-- pending.jsp -->
> > <%@ page import="java.sql.*, java.util.*, user.UserHandler"%>
> > <jsp:useBean id="userbean" scope="session" class="user.UserHandler" />
> > <jsp:setProperty name="userbean" property="*" />
> > <%
> > // get parameters from request object
> > String userid = userbean.getUserid();
> > if (userid == null)
> > {
> >  response.sendRedirect("login.jsp?msg=Session%20Timeout");
> > }
> >
> > Database db = new Database();
> > Connection conn1 = null;
> > Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ).newInstance();
> > conn1 = DriverManager.getConnection( "jdbc:odbc:FROGGODB", "sa", "");
> > while (conn1 == null )
> > {
> >  conn1 = DriverManager.getConnection( "jdbc:odbc:FROGGODB", "sa", "");
> > }
> >
> > Statement stmt = conn1.createStatement();
> >
> > %>
> > <html>
> > <head>
> > <title>Results</title>
> >
> > <style>
> > a:link {font:Helvetica; text-decoration:none; color:blue}
> > a:visited {font:Helvetica; text-decoration:none; color:purple}
> > a:active {font:Helvetica; text-decoration:none; color:blue}
> > a:hover {font:Helvetica; color:red; text decoration:none; }
> > </style>
> > </head>
> > <body bgcolor=#EAEAAE text=#000000>
> >
> > <table border=0 width=580 cellpadding=1 cellspacing=0>
> > <tr><td height="30" valign="top" bgcolor=#09734F><font face=verdana
> > color=#EAEAAE size=5>
> >  <b>Search Results</b></font></td></tr>
> > <tr><td>&nbsp;</td></tr>
> > <tr><td><table border=0 width=580 cellspacing=0 cellpadding=2>
> >     <tr><td width=150 align=center background=./images/tab.gif><a
> > href=result.jsp><font face=verdana size=2><b>Done</b></font></a></td>
> >       <td width=150 align=center background=./images/tab.gif><font
> > face=verdana size=2><b>Pending</b></font></td>
> >       <td width=280>&nbsp;</td></tr>
> >     </table></tr></td>
> > </table>
> >
> > <table border=1 width=580 cellspacing=0 cellpadding=0
> > bordercolor=#639C39><!-- container table -->
> > <tr><td>
> >
> > <table width=600>
> > <%
> > ResultSet rsreq = stmt.executeQuery(
> >      "SELECT * FROM Request WHERE member_id LIKE '" + userid +
> >      "' AND status < 60 ORDER BY date_issued DESC");
> > if (!rsreq.next())
> > {
> >  out.println("<tr><td colspan=2>&nbsp</td></tr>");
> >  out.println("<tr><td colspan=2><font face=verdana size=2>No search
> > request(s) in process</font></td></tr>");
> >  out.println("<tr><td colspan=2>&nbsp</td></tr>");
> > }
> > else
> > {
> > %>
> >
> > <form name=resultList method=post action=deletesearch.jsp>
> > <input type=hidden name=next value="pending.jsp">
> > <tr><td colspan=2>&nbsp</td></tr>
> > <tr><td><font face=verdana size=2><b>Search requests still in
> > process:</b></font></td>
> >   <td align=center><font face=verdana
> size=2><b>Cancel</b></font></td></tr>
> >
> > <%
> >  rsreq.close();
> >  rsreq = stmt.executeQuery(
> >      "SELECT * FROM Request WHERE member_id LIKE '" + userid +
> >      "' AND status < 60 ORDER BY date_issued DESC");
> >  int i=1;
> >  while(rsreq.next())
> >
> >   int rid = rsreq.getInt("request_id");
> >   String keywords = rsreq.getString("keywords");
> >   String docpath = rsreq.getString("doc_paths");
> >   String requesturl = rsreq.getString("urls");
> >   int status = rsreq.getInt("status");
> >
> >   if(keywords != null && !(keywords.equals("")) &&
> > !(keywords.equals("null"))){
> >    out.println("<tr><td><font size=1>(" + i + "). kw: " + keywords +
> > "</font></td>");
> >   }
> >   else if(docpath != null && !(docpath.equals("")) &&
> >
> ocpath.equals("null"))){
> >    out.println("<tr><td><font size=1>(" + i + "). dp: " + docpath +
> "</font></td>");
> >   }
> >   else {
> >    out.println("<tr><td><font size=1>(" + i + "). url: " + requesturl +
> "</font></td>");
> >   }
> >
> >   if (status < 20)
> >   {
> >     out.print("<td align=center><input type=checkbox name=rids value=" +
> rid + "></td></tr>");
> >   }
> >   else
> >   {
> >     out.print("<td align=center><font size=1 face=verdana
color=red>Can't
> cancel(Processing...)</font></td></tr>");
> >   }
> >
> >   i++;
> >  }
> >  out.println("<tr><td>&nbsp</td><td align=center><input type=submit
> value=Submit></td></tr></form>");
> >  out.println("<tr><td>&nbsp</td></tr><tr><td><font size=1>An email will
> be sent to you when the request(s) has been
> processed.</font></td></tr></form>");
> >
> > }
> > rsreq.close();
> > stmt.close();
> > conn1.close();
> > %>
> >
> > </table>
> > </td></tr></table>
>
> > </body>
> > </html>
> >
> >
> >
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to