Re: jdbc works in java app, fails in servlet: "no suitable jdbc found"

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Manohar Bhattarai <manoharbhattarai(at)gmail(dot)com>
Cc: philfrei(at)aol(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: jdbc works in java app, fails in servlet: "no suitable jdbc found"
Date: 2010-06-03 05:52:26
Message-ID: 4C07431A.9020506@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2010-06-03 06:19:19 Re: JDBC SSL with postgresql
Previous Message Craig Ringer 2010-06-03 05:50:10 Re: JDBC SSL with postgresql