On 6/3/2010 1:52 AM, Craig Ringer wrote:
> 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
I don't know the OP's configuration, but in Tomcat a common way to
handle database connections is to use the Tomcat-provide pooling
mechanism. If this option is chosen, then you must get the appropriate
database drivers into Tomcat's bootstrap classpath. Tomcat initializes
the connection pools before starting up any of the webapps, so putting
the database JARs into a particular webapp won't work.
If you elect not to use Tomcat's database pools, then of course you can
include the database drivers in with your application. But then if you
have 3 or 4 applications using the same database, each will have its own
connection pool, which is sub-optimal.
In response to
pgsql-jdbc by date
|Next:||From: philfrei||Date: 2010-06-04 05:48:20|
|Subject: Re: jdbc works in java app, fails in servlet: "no suitable jdbc found"|
|Previous:||From: Craig Ringer||Date: 2010-06-03 06:23:15|
|Subject: Re: jdbc works in java app, fails in servlet: "no suitable