--- "Fumo, Vince" <[EMAIL PROTECTED]> wrote:
> Hi all. I'm sure this has been asked before but I can't seem to find it
> in
> the archives.
> 
> I'm building a simple web app and I want to use a connection pool. I've
> decided to use the commons dbcp BasicDataSource class
> (org.apache.commons.dbcp.BasicDataSource). Here is the struts-config I'm
> using (based on the one from the struts faq) :
> 
> <data-sources>
> <data-source type="org.apache.commons.dbcp.BasicDataSource">
>     <set-property property="autoCommit"  value="true" />
>  <set-property property="description" value="MySQL datasource" />
>     <set-property property="driverClass" value="com.mysql.jdbc.Driver"
> />
>     <set-property property="maxCount"  value="10" />
>     <set-property property="minCount"  value="2" />
>     <set-property property="username"  value="username" />
>     <set-property property="password"  value="password" />
>     <set-property property="url"
> value="jdbc:mysql://localhost:3306/databasename" />
> </data-source>
> </data-sources>
> 
> I have placed the following jars in my \WEB-INF\lib folder :
> 
> commons-collections.jar
> commons-dbcp.jar
> commons-pool.jar
> commons-logging.jar
> mysql-connector-java-3.0.8-stable-bin.jar
> struts.jar

GenericDataSource lives in struts-legacy.jar.  Add that to your lib
directory and it should find it.

David

> 
> From what I've read and seen, this should work fine. However, no matter
> what
> I try, I get the following exception:
> 
> java.lang.NoClassDefFoundError:
> org/apache/struts/legacy/GenericDataSource
> 
> I'm aware that GenericDataSource is depreciated. However, I'm not trying
> to
> use it. My only guess is that somehow struts/tomcat isn't finding the
> commons.dbcp.BasicDataSource and it trying to default to the
> GenericDataSource instead.
> 
> Does anyone have any idea how I can get this to work? I'm willing to try
> anything but my main goal is to have a pooled connection to my mySQL
> database.
> 
> Thanks in advance.
> 
> v
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to