Received: from listserv.digiweb2.dk (listserv.digiweb2.dk [194.239.250.184]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA83857 for ; Tue, 21 Sep 1999 08:02:35 -0400 (EDT) (envelope-from anders@simusoft.dk) Received: from 194.239.250.245 ([194.239.250.245]) by listserv.digiweb2.dk (8.9.3/8.9.3) with SMTP id NAA10946 for ; Tue, 21 Sep 1999 13:54:48 +0200 (MET DST) Received: from (43.ppp1-32.image.dk [212.54.71.107]) by with SMTP (MailShield v1.5); Tue, 21 Sep 1999 14:06:56 +0200 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Sender: anders$simusoft.dk@pop.simusoft.dk (Unverified) Message-Id: Date: Tue, 21 Sep 1999 14:02:19 +0200 To: pgsql-interfaces@postgresql.org From: Anders Svensson Subject: JDBC, can't connect to postgres Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id IAA85282 I am trying to use postgres as database server on a servlet run under Apache and jserv Problem is when I isue the Class.forName("postgresql.Driver") I get an ClassNotFound Exception. The latest driver for jdbc (jdbc6.5-1.2.jar) is the only path in my CLASSPATH. The java-program compiles just fine, and postmaster is started with the -i option. I am running the java program for a test without apache and servlet, on the same machine as postmaster is on, but as a different user. the config file for postmaster includes local all trust Any suggestions???? import java.io.*; import java.net.*; import java.sql.*; public class test { public static void main (String args[]) { try { Class.forName("postgresql.Driver"); System.out.println("Class.forName OK!"); String url = "jdbc:postgresql://192.168.1.1/fraggi"; String usr ="root"; String pwd =""; Connection db = DriverManager.getConnection (url,usr,pwd); if (db !=null) System.out.println("Connected OK to database"); else System.out.println("Faild to connect"); } catch (Exception e) { System.out.println(e.toString()); } } } Simu Soft v/Anders Svensson Frederikssundsvej 20, 2 th DK-2400 København NV e-mail : Anders@simusoft.dk tlf. : +45 3583 8126