Read this:
http://jakarta.apache.org/struts/faqs/database.html Also wanted to mention that I'm not sure if you are going to have problems if you are not using the struts.jar from release 1.1 The other item I had a problem with is: <set-property property="validationQuery" value="SELECT > > > COUNT(*) FROM userAttributes" /> If this fails your datasource will not work. If it does fail completely remove this statement. Barry ----- Original Message ----- From: "Paul Idusogie" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, October 21, 2003 11:44 AM Subject: RE: Please Please Help! -- DataSource Error > Thanks for your support, I was able to redeem a copy of the > struts-legacy.jar. > > I have the following questions however: > > Does this datasource model still support connection pooling.? > > Now if this code is specified as legacy, are there better approaches to > retrieving database data without using ejbs.? > > > Sincerely, > > > Paul Idusogie > > > -----Original Message----- > From: Barry Volpe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 21, 2003 1:20 PM > To: Struts Users Mailing List > Subject: Re: Please Please Help! -- DataSource Error > > > In the struts 1.1 Final release > > in the /lib directory > > Barry > > > ----- Original Message ----- > From: "Paul Idusogie" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Tuesday, October 21, 2003 11:17 AM > Subject: RE: Please Please Help! -- DataSource Error > > > > Where do I find the struts legacy package? > > > > Sincerely, > > > > > > Paul Idusogie > > > > > > > > > > -----Original Message----- > > From: Barry Volpe [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, October 21, 2003 1:13 PM > > To: Struts Users Mailing List > > Subject: Re: Please Please Help! -- DataSource Error > > > > > > They way I got it working was including > > the > > > > struts-legacy.jar > > commons-dbcp.jar > > commons-pool.jar > > > > and it works. > > > > Barry > > > > > > > > ----- Original Message ----- > > From: "Rajat Pandit" <[EMAIL PROTECTED]> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>; > > <[EMAIL PROTECTED]> > > Sent: Tuesday, October 21, 2003 11:07 AM > > Subject: RE: Please Please Help! -- DataSource Error > > > > > > > Hi there, this errors looks familiar to me as a one time struts newbie, > > > you need to a file called struts-legacy.jar to help you. This is if ur > > > using the generic data source. I still havent been able to figure out > > > how to get org.apache.commons.dbcp.BasicDataSource to work fr me. > > > Any pointers > > > > > > > > > -----Original Message----- > > > From: Paul Idusogie [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, October 21, 2003 10:45 AM > > > To: [EMAIL PROTECTED] > > > Subject: Please Please Help! -- DataSource Error > > > Importance: High > > > > > > > > > I have the following setup within my struts-config.xml file > > > > > > <data-sources> > > > <data-source key="myDB" > > > type="org.apache.commons.dbcp.BasicDataSource" > > > > <set-property property="description" value="my > > > Database"/> > > > <set-property property="url" > > > value="jdbc:mysql://localhost:3306/myDB"/> > > > <set-property property="driverClass" > > > value="com.mysql.jdbc.Driver"/> > > > <set-property property="maxCount" value="5"/> > > > <set-property property="minCount" value="1"/> > > > <set-property property="user" value="root"/> > > > <set-property property="password" value="mypassword"/> > > > <set-property property="maxActive" value="10" /> > > > <set-property property="maxWait" value="5000" /> > > > <set-property property="defaultAutoCommit" value="false" > > > /> > > > <set-property property="defaultReadOnly" value="false" > > > /> > > > <set-property property="validationQuery" value="SELECT > > > COUNT(*) FROM userAttributes" /> > > > </data-source> > > > </data-sources> > > > > > > but I get the following error when I restart tomcat. > > > > > > ----- Root Cause ----- > > > java.lang.NoClassDefFoundError: > > > org/apache/struts/legacy/GenericDataSource > > > at java.lang.ClassLoader.defineClass0(Native Method) > > > at java.lang.ClassLoader.defineClass(ClassLoader.java:502) > > > at > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) > > > at > > > org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla > > > ssLo > > > ader.java:1680) > > > at > > > org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader > > > .jav > > > a:968) > > > at > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader > > > .jav > > > a:1410) > > > at > > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader > > > .jav > > > a:1289) > > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) > > > at > > > org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServl > > > et.j > > > ava:1084) > > > at > > > org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) > > > at javax.servlet.GenericServlet.init(GenericServlet.java:256) > > > at > > > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav > > > a:93 > > > 5) > > > at > > > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823) > > > at > > > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j > > > ava: > > > 3421) > > > at > > > org.apache.catalina.core.StandardContext.start(StandardContext.java:3609 > > > ) > > > at > > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) > > > at > > > org.apache.catalina.core.StandardHost.start(StandardHost.java:738) > > > at > > > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) > > > at > > > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) > > > at > > > org.apache.catalina.core.StandardService.start(StandardService.java:497) > > > at > > > org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) > > > at > > > org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:2 > > > 73) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav > > > a:39 > > > ) > > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor > > > Impl > > > .java:25) > > > at java.lang.reflect.Method.invoke(Method.java:324) > > > at > > > org.apache.catalina.startup.BootstrapService.start(BootstrapService.java > > > :245 > > > ) > > > at > > > org.apache.catalina.startup.BootstrapService.main(BootstrapService.java: > > > 307) > > > > > > 2003-10-21 11:12:41 StandardWrapper[/pentstarjsp:default]: Loading > > > container servlet default 2003-10-21 11:12:41 > > > StandardWrapper[/pentstarjsp:invoker]: Loading container servlet invoker > > > > > > > > > Now there is a file GenericDataSource class located within the package > > > org/apache/struts/util/GenericDataSource in the struts.jar > > > > > > I cannot find the reference located at > > > org/apache/struts/legacy/GenericDataSource > > > > > > I am using struts 1.1 > > > > > > Please help > > > > > > > > > Sincerely, > > > > > > > > > Paul Idusogie > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > 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] > > > > > > > > --------------------------------------------------------------------- > > 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] > > > --------------------------------------------------------------------- > 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]