Received: from tcs.com ([202.9.158.48]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBDIJBL09032 for ; Wed, 13 Dec 2000 13:19:21 -0500 (EST) (envelope-from sk@pobox.com) Received: from tcispl-ntws9 ([192.168.1.34]) by tcs.com (8.9.3/8.9.3) with SMTP id XAA17987; Wed, 13 Dec 2000 23:50:00 +0530 Message-Id: <200012131820.XAA17987@tcs.com> X-Sender: manishvig@tcs.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0 Date: Wed, 13 Dec 2000 23:50:14 +0000 To: java-apache-users@list.working-dogs.com From: Manish Vig Subject: No SuitableDriver error while inserting through Servlet ,while No error through A Java application Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Archive-Number: 200012/112 X-Sequence-Number: 456 Dear Sir, I am trying to run UpdateQuery from a redhatlinux 6.2 server with Apache Jserv with PostGres. When I try a simple Insert statement or a Query statement from a Java Applicationit works fine, But when i try to do that through a servlet. It gives me No Suitable Driver. I have my PostGreSQL Driver in the ext directory of jre/lib/ext/ the following code tries to make a connection and inserts the statements try {Class.forName("org.postgresql.Driver"); } catch(ClassNotFoundException ex){System.err.println(ex.getMessage());} try{ con=DriverManager.getConnection("jdbc:postgresql://localhost/dbname","userna me",""); st= con.createStatement(); } catch(SQLException eft){System.err.println(eft.getMessage());} //the error reported here is No Suitable Driver try{ String stat="INSERT INTO ...." System.err.println(stat);st.executeUpdate(stat); } catch(Exception e){System.err.println(e.getMessage());} The Error reported here is Null Pointer Exception Is there any thing special with the servlet trying to access the PostGresql jdbc driver.