Skip site navigation (1) Skip section navigation (2)

JDBC connection issue

From: "Young Nam" <Ynam(at)sharedmarketing(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: JDBC connection issue
Date: 2004-07-13 16:03:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc

I am having some difficulties connecting to a local postgresql database via jdbc driver.

my setup is:
mandrake 10.0
postgresql 7.4.3

I've configured postgresql from its source with --with-java option, make, and 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	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 {

and I am getting the following exception..

java.lang.ClassNotFoundException: org.postgresql.Driver

Any ideas would be very much appreciated.



pgsql-jdbc by date

Next:From: Bill ChandlerDate: 2004-07-13 16:13:46
Subject: Re: [PERFORM] Cursors performance
Previous:From: Steven BellDate: 2004-07-13 15:42:06
Subject: Retrieving User information

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group