You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Anderson <ja...@jandernet.com> on 2004/01/28 17:07:11 UTC
newbie datasource config problems
I'm trying to configure my Struts 1.1 app for MySQL access and getting
nothing but grief. Currently, I'm showing the following error in the
log file:
java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource
Could someone please send me samples of what web.xml and
struts-config.xml should look like when properly configured?
Thanks very much,
jim
RE: newbie datasource config problems
Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
hi jim,
again...
here in your struts-conf:
<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName"
value="com.mysql.jdbc.Driver" />
<set-property property="url"
value="jdbc:mysql://localhost:3306/myDatabase" />
<set-property property="username" value="root" />
<set-property property="password" value="" />
<set-property property="defaultAutoCommit" value="true" />
<set-property property="defaultReadOnly" value="false" />
</data-source>
but it needs the pool.jar and
dbcp.jar
from the commons-projects
- http://jakarta.apache.org/commons/pool/
- http://jakarta.apache.org/commons/dbcp/
it for 1.2 and later
look here for more:
http://jakarta.apache.org/struts/faqs/database.html
(The Struts DataSource Manager)
greetings
matthias
-----Original Message-----
From: Jim Anderson [mailto:jander@jandernet.com]
Sent: Wednesday, January 28, 2004 5:07 PM
To: Struts Users Mailing List
Subject: newbie datasource config problems
I'm trying to configure my Struts 1.1 app for MySQL access and getting
nothing but grief. Currently, I'm showing the following error in the
log file:
java.lang.NoClassDefFoundError:
org/apache/struts/legacy/GenericDataSource
Could someone please send me samples of what web.xml and
struts-config.xml should look like when properly configured?
Thanks very much,
jim
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org