Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 33576 invoked from network); 12 Jun 2000 14:48:06 -0000 Received: from copper.net (HELO copper?mail.paste.net) (209.41.196.3) by locus.apache.org with SMTP; 12 Jun 2000 14:48:06 -0000 Received: from bluemoon (unverified [209.41.196.55]) by copper_mail.paste.net (Vircom SMTPRS 4.2.181) with SMTP id for ; Mon, 12 Jun 2000 11:09:03 -0400 From: dyutzy@copper.net Date: Mon, 12 Jun 2000 14:46:01 GMT Message-ID: <20000612.14460141@mis.configured.host> Subject: Java error when someone hits JSP with Bean To: tomcat-user@jakarta.apache.org Reply-To: dyutzy@copper.net In-Reply-To: References: X-Mailer: Mozilla/3.0 (compatible; StarOffice/5.2;Win32) X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hello, Environment: 1) Apache (latest version). 2) TomCat (latest version). 3) JDK 1.2.2 4) Bean is hitting MS Access 97 MDB The page renders just fine in the browser exactly as coded but server si= de=20 the Java Window crashes. I get an "Exception" dialog that Java has caus= ed=20 an error. If I don't shutdown TomCat and Apache and restart them both, the machine= =20 blue screens when someone else hits the box. Any ideas are appreciated. CODE FOR BEAN: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D package News; import java.lang.*; import java.sql.*; public class Component { public String getArticles(int Month) throws Exception { String Result =3D ""; String Driver =3D "sun.jdbc.odbc.JdbcOdbcDriver"; String URL =3D "jdbc:odbc:HMG"; String SQL =3D "SELECT * FROM LatestNews WHERE Month(Posted) =3D= " +=20 Month + " ORDER BY Posted DESC"; Connection con =3D null; Statement stmt =3D null; ResultSet rs =3D null; try { Result +=3D ""; Result +=3D ""; Result +=3D ""; Result +=3D ""; Result +=3D ""; } } catch (Exception ex) { Result =3D "
PostedArtic= le"; Class.forName(Driver); con =3D DriverManager.getConnection(URL); stmt =3D con.createStatement(); rs =3D stmt.executeQuery(SQL); while (rs.next()) { Result +=3D "
" + rs.getString(2) += =20 "" + rs.getString(3) += =20 "
"; Result +=3D "
Exception!!!"; } finally { rs.close(); stmt.close(); con.close(); Result +=3D "
"; } return Result; } }