X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 99DF3D1B462 for ; Wed, 21 Jul 2004 18:49:52 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71257-03 for ; Wed, 21 Jul 2004 21:48:40 +0000 (GMT) Received: from bifrost.admc.com (170-215-158-222.bras01.cha.wv.frontiernet.net [170.215.158.222]) by svr1.postgresql.org (Postfix) with ESMTP id 75B81D1B484 for ; Wed, 21 Jul 2004 18:48:18 -0300 (ADT) Received: from 170-215-158-222.bras01.cha.wv.frontiernet.net ([170.215.158.222] helo=admc.com) by bifrost.admc.com with asmtp (TLSv1:AES256-SHA:256) (Exim 4.30) id 1BnOwH-0001ZM-Vp for pgsql-jdbc@postgresql.org; Wed, 21 Jul 2004 17:47:50 -0400 Message-ID: <40FEE48C.3010208@admc.com> Date: Wed, 21 Jul 2004 17:47:56 -0400 From: Blaine Simpson User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: JDBC connection issue References: <581C48EBC132FF459E62A6809D0D72AE22C749@mail.sharedmarketing.com> <1ac22fd7.0407190027.53d75925@posting.google.com> In-Reply-To: <1ac22fd7.0407190027.53d75925@posting.google.com> X-Enigmail-Version: 0.83.4.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/258 X-Sequence-Number: 10642 Use "md5" instead of "trust". Besides trust having all sorts of problems to do with ident daemons, I don't even know if the JDBC driver will work with ident, since JDBC network drivers generally pass a username and password. First get psql working locally before trying to get the JDBC driver to work, like psql -h hostname -U blaine dbname Here's a typical md5 record: host all all 192.168.100.0 255.255.255.0 md5 Where, as you probably know, 192.168.100.0/255.255.255.0 is the permitted source IP range. I've worked with about a dozen network JDBC drivers over the past several years, as a driver developer and a user. Contrary to what some Java-phobes say, JDBC drivers are very easy to use directly from Java clients. The difficulty comes when vendors build shitty abstraction, pooling, and management functions to isolate your code from the JDBC drivers. Load your JDBC driver directly with your own code and everything is simple. I recommend you try my SqlTool client as a utility to get your setup working. http://hsqldb.sourceforge.net/guide/ch07.html >>Hi, >> >>I am having some difficulties connecting to a local postgresql database via >> jdbc driver. >> >>my setup is: >>mandrake 10.0 >>j2sdk1.4.2 >>postgresql 7.4.3 >> >>I've configured postgresql from its source with --with-java option, make, a >>nd make install. >> >>The default directory for the postgresql.jar is /usr/local/pgsql/share/java >>/postgresql.jar >>I've run >jar -tf /usr/local/pgsql/share/java/postgresql.jar and the class >>files seem to be in the right order. >> >>I've added the following line to the pg hba.conf to test local connections >>via jdbc driver. >>local all all 127.0.0.1 trust >> >>Also, changed the postgresql.conf >>tcpip socket = true >> >>Added CLASSPATH to bashrc file >>export CLASSPATH=/usr/local/pgsql/share/java/postgresql.jar:${CLASSPATH} >> >>and I am trying to run the following code >>import java.sql.*; >>import java.util.*; >> >>public class Xlang { >> public static void main(String[] args) { >> try { >> Class.forName("org.postgresql.Driver"); >> ... >> } >>} >> >>and I am getting the following exception.. >> >>java.lang.ClassNotFoundException: org.postgresql.Driver >> >>Any ideas would be very much appreciated. >> >>YJ >> >>---------------------------(end of broadcast)--------------------------- >>TIP 9: the planner will ignore your desire to choose an index scan if your >> joining column's datatypes do not match >> >> -- ICF: 703-934-3692 Cell: 703-944-9317