Re: jdbc works in java app, fails in servlet: "no suitable jdbc found" - Mailing list pgsql-jdbc

From Craig Ringer
Subject Re: jdbc works in java app, fails in servlet: "no suitable jdbc found"
Date
Msg-id 4C07431A.9020506@postnewspapers.com.au
Whole thread Raw
In response to Re: jdbc works in java app, fails in servlet: "no suitable jdbc found"  (Manohar Bhattarai <manoharbhattarai@gmail.com>)
Responses Re: jdbc works in java app, fails in servlet: "no suitable jdbc found"  (Guy Rouillier <guyr-ml1@burntmail.com>)
List pgsql-jdbc
On 3/06/2010 12:15 PM, Manohar Bhattarai wrote:

> I had the same problem of getting exception of class not found as you
> are getting. I have solved the problem by simply putting the jar file in
> CATALINA_HOME/lib/ directory. Then i restarted Eclipse.
> And wow the driver was found. This was solved just yesterday. See if
> this helps you.

That's usually not the best way to do it (at least in Glassfish-land)
though, because that jar is visible to all installed apps. It gets
complicated if different servelets require different versions of some
libraries.

If you're using .war packaging, you should be able to get Eclipse to
include the required jar in the package. In NetBeans it "just works"
(especially with Maven war packaging) but perhaps Eclipse needs a bit
more help.

--
Craig Ringer

pgsql-jdbc by date:

Previous
From: Craig Ringer
Date:
Subject: Re: JDBC SSL with postgresql
Next
From: Craig Ringer
Date:
Subject: Re: JDBC SSL with postgresql