JDBC connection problem while trying example.basic

Lists: pgsql-interfaces
From: Doug Thistlethwaite <doug(at)dupreeinc(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: JDBC connection problem while trying example.basic
Date: 1999-07-12 22:31:48
Message-ID: 378A6CD4.ABBD1AD2@dupreeinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

Hello,

I am very new to using postgresql. I have a linux system at home
(Debian "slink" 2.0.36) which I have installed postgresql. The
postgresql on the linux system seems to be running fine and I can use
psql to test sql statements. I edited the init file and changed the
postmaster to accept tcp/ip connections.

My problem is when I try to talk to the database from a win95 system
using jdk1.2 and the sample program incloded with the JDBC driver. When
I run the program example.basic I get the following:

Connecting to Database URL = jdbc.postgresql://dragon:5432/doug
Exception caught.
java.sql.SQLException: No suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at example.basic.<init>(basic.java:34)
at example.basic.main(basic.java:168)

Does this mean there is a problem with the driver? The postgresql.jar
file is in the classpath. The linux system I am using is called
dragon and it should be using the default port of 5432.

Any thoughts on what is going wrong?

Thank you,

Doug


From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Doug Thistlethwaite <doug(at)dupreeinc(dot)com>, pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] JDBC connection problem while trying example.basic
Date: 1999-07-13 08:14:37
Message-ID: l03130300b3b0a5a0b6cd@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-interfaces

At 01:31 +0300 on 13/07/1999, Doug Thistlethwaite wrote:

> Connecting to Database URL = jdbc.postgresql://dragon:5432/doug

This should be "jdbc:postgresql" - a colon, not a period. And I think you
can drop the port number since it is the default for Postgres.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma