--- "Fumo, Vince" <[EMAIL PROTECTED]> wrote: > Yes..I know that I can include the legacy jar but I don't want to. I'd > prefer to not use depreciated librarys in my app. The thing I'm confused > about is that I'm not sure how I'm even using GenericDataSource at all. > I > thought that by explicitly using the BasicDataSource I would be avoiding > this problem.
Having the jar in your lib directory doesn't mean you're using deprecated functionality. Indeed, you're not even using GenericDataSource. You must install that jar because Struts uses it internally. It has been removed for 1.2. David > > -----Original Message----- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Friday, August 22, 2003 1:08 PM > To: Struts Users Mailing List > Subject: Re: <data source> problems > > > --- "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] > > --------------------------------------------------------------------- > 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]

