Re: suitable driver not found

From: Kris Jurka <books(at)ejurka(dot)com>
To: poonam talreja <poonammtalreja(at)yahoo(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: suitable driver not found
Date: 2004-01-31 11:06:58
Message-ID: Pine.LNX.4.33.0401310602460.5385-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sat, 31 Jan 2004, poonam talreja wrote:

> The code given below gives an exception as:
> a suitable driver not found.
>
> Class.forName("org.postgresql.Driver");
> String url="jdbc:postgresql://127.0.0.1:5432/a;
> Connection con = DriverManager.getConnection(url, "postgres", "");
>

The two common reasons for no suitable driver found are forgetting
Class.forName and making a typo in the url which makes it invalid for
postgresql. You seem to have the forName working well, but it is tough to
tell what is going on here because this is obviously not exactly what you
are using because it is missing and end " on the url. Please examine your
connection url carefully and report back with the exact string used if
that does not solve your problme.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message snpe 2004-01-31 11:23:43 Re: Config on Netbeans for OS X Panther
Previous Message poonam talreja 2004-01-31 10:53:25 suitable driver not found