> From: Christian Bruckhoff [mailto:christian.bruckh...@gmx.de] > Subject: Re: Connecting Tomcat to a database > > Sorry was in a haste, forgot much more than this. :-/ > - Tomcat 7.0.0 > - Java 1.6 Update 20 > - Windows XP SP3 > - Wanted to use DB for Apache ODE 2.0 Beta
> That's how it was shown here: http://ode.apache.org/war-deployment.html Most unfortunate that they're suggesting very, very out of date practices. Put the MySQL JDBC driver in Tomcat's lib directory, not common/lib (that was changed quite some time ago). Place the following <Context> element in webapps/ode/META-INF/context.xml: <Context reloadable="true" crossContext="true"> <Resource name="jdbc/ODEDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="root" password="" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/ode?autoReconnect=true"/> </Context> BTW, it's unlikely you need the crossContext attribute, and reloadable is on by default. Note that the above requires MySQL to be running without a password (poor practice), unless you fill in the attribute. > (that was [1] btw). What's the best solution for this? See the Tomcat doc for <Context>: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html > Where can I find them? The logs are in the logs directory, oddly enough. > "startup.bat" run didn't work Read what I posted: use catalina.bat, not the startup.bat script. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org