Re: Using the JDBC Driver in version 7.02 - Mailing list pgsql-general

From Peter Mount
Subject Re: Using the JDBC Driver in version 7.02
Date
Msg-id 079301bfecf9$8bfeb2c0$382029d4@retep.org.uk
Whole thread Raw
In response to Using the JDBC Driver in version 7.02  ("Justin Jaynes" <justinjaynes@hotmail.com>)
List pgsql-general
See below
--
Peter T Mount peter@retep.org.uk, peter@retepdigital.com, me@petermount.com
Homepage: http://www.retep.org.uk Contact details @ http://petermount.com
PostgreSQL JDBC: http://www.retep.org.uk/postgres/
Java PDF generator: http://www.retep.org.uk/pdf/


----- Original Message -----
From: Marko Kreen <marko@l-t.ee>
To: Peter Mount <peter@retep.org.uk>
Cc: Joseph Shraibman <jks@selectacast.net>; Justin Jaynes
<justinjaynes@hotmail.com>; <pgsql-general@postgresql.org>
Sent: Tuesday, July 11, 2000 12:58 PM
Subject: Re: [GENERAL] Using the JDBC Driver in version 7.02


> On Tue, Jul 11, 2000 at 12:05:29AM +0100, Peter Mount wrote:
> >
> > ----- Original Message -----
> > From: Joseph Shraibman <jks@selectacast.net>
> > To: Justin Jaynes <justinjaynes@hotmail.com>
> > Cc: <pgsql-general@postgresql.org>
> > Sent: Monday, July 10, 2000 9:57 PM
> > Subject: Re: [GENERAL] Using the JDBC Driver in version 7.02
> >
> > > Justin Jaynes wrote:
> > > >
> > > > the line:
> > > >
> > > > Class.forName("org.postgresql.Driver");
>
> Try:
>
> Class.forName("postgresql.Driver");

No, this won't work. As of 7.0 it's org.postgresql.Driver

> Ofcource, check that postgresql.jar is in classpath.  If Java >= 1.2,
> you can instead drop it in $JAVA_HOME/jre/lib/ext.

This is the most likely reason it's not working.

>
> > > >
> > > > I get an error that the DriverManager cannot find a suitable driver.
> > > >
> > > > The code I use to connect goes as follows:
> > > >
> > > > Connection chamber = DriverManager.getConnection("localhost:5432");
> >
> > This isn't a valid JDBC URL. You'll need something like:
> >
> >     jdbc:postgresql:database            <= Use when on local host
> >     jdbc:postgresql://server/database    <= Use when on remote host
> >
>
>
> --
> marko
>


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: select for update not locking properly.
Next
From: "Peter Mount"
Date:
Subject: Re: pgdump & blob