From: Mathew Hreljac <mhreljac@borderware.com>
To: Peter Mezzina <pmezzina@processintelligence.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: No suitable driver
Date: Wed, 20 Jun 2001 10:37:20 -0400
Message-ID: <3B30B520.A0110B57@borderware.com> (raw)
References: <3B2A84DA.2030607@processintelligence.com>
This error occurs in JDBC when you don't register the driver in the JVM
before trying to use it. You need this line before you can get a
connection from the database:
Class.forName( "org.postgresql.Driver" ); // Or substitute whatever driver
you are using...
Matty
Peter Mezzina wrote:
> I have Tomcat 3.2.1 and Postgres 7.0.3 running well in Solaris and I
> have installed the JDBC driver, jdbc7.0-1.2.jar, in both the
> <TOMCAT_HOME>/lib and a second directory off of the tomcat tree. With
> the jar file in the classpath the driver works fine from an application
> but produces the error "No suitable driver" when called from within a
> servlet. Having combed through the jdbc mailing list I have tried
> placing the jar file in the <TOMCAT_HOME>/lib (a restart of tomcat
> references the existence of the jar file in its output) and I have set
> the driver's path for wrapper.classpath in tomcat.properties for the
> parameter wrapper.classpath and set the driver name for
> wrapper.bin.parameters.
>
> Is there anyone who might have some advise about whatelse needs to be
> done for this?
>
> -Peter Mezzina
> pmezzina@processintelligence.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: mhreljac@borderware.com, pmezzina@processintelligence.com
Subject: Re: No suitable driver
In-Reply-To: <3B30B520.A0110B57@borderware.com>
References: <3B2A84DA.2030607@processintelligence.com> <3B30B520.A0110B57@borderware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox