RE: plain MySQL DataSource in Tomcat (i know, damn topic)
Marc, I have read this, and your excellent howto, http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2 and I am still having a problem at the startup of the tomcat server. The JNDI service is failing before I even get a chance to test it my server.xml and JNDI naming is pretty much the same (I think) !-- the data source added by Clay-- Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_DBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameternamemaxActive/namevalue100/value/parameter parameternamemaxIdle/namevalue3/value/parameter parameternamemaxWait/namevalue100/value/parameter parameternameusername/namevaluetomcat/value/parameter parameternamepassword/namevaluepassword/value/parameter parameter namedriverClassName/namevalueorg.gjt.mm.mysql.Driver/value /parameter parameter nameurl/namevaluejdbc:mysql://localhost:3306/test/value /parameter /ResourceParams /Context !-- end data source -- in my $CATALINA_HOME/comm/lib/ the following jars exist: [root@meis lib]# ls -al|grep commons -rw-r--r--1 root root90489 Jun 1 00:55 commons-collections.jar -rw-r--r--1 root root25451 Jun 1 00:55 commons-dbcp.jar -rw-r--r--1 root root22840 Jun 1 00:55 commons-logging.jar -rw-r--r--1 root root28841 Jun 1 00:55 commons-pool.jar [root@meis lib]# ls -al|grep my -rw-rw-r--1 root root 125901 Jun 30 21:52 mm.mysql-2.0.14-bin.jar I know the port is correct: [root@meis test]# mysqladmin --print-defaults mysqladmin would have been started with the following arguments: --port=3306 --host=localhost but when I start tomcat and look at the log for the JNDI service: [root@meis logs]# tail -f localhost_DBTest_log.2002-07-08.txt 2002-07-08 11:07:06 StandardContext[/DBTest]: Starting 2002-07-08 11:07:06 StandardContext[/DBTest]: Processing start(), current available=false 2002-07-08 11:07:06 StandardContext[/DBTest]: Configuring default Resources This isn't enough information for me to figure out what the problem may be, I know alot of people just download the latest version of everything and hope that works but I would like to know why this is failing any help would help! clay -Original Message- From: Marc Logemann [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 5:35 AM To: [EMAIL PROTECTED] Subject:plain MySQL DataSource in Tomcat (i know, damn topic) Hi, i am one of the guys trying to get a valid MysqlDataSource reference via JNDI. But i am getting crazy without knowing where the problem is (perhaps the reason is, i cant debug JNDI too good, cause i am no expert in it..) i have the following: server.xml -- context Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/va lue /parameter parameter nameuser/namevalueroot/value /parameter parameter namepassword/namevalue/value /parameter parameter namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.optional.Mysql DataSource/value/parameter parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value /parameter /ResourceParams /context web.xml --- web-app resource-ref descriptionDataSource MySQL/description res-ref-namejdbc/TestDB/res-ref-name res-type javax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app i placed the mysql mm jar into commons/lib When i run a servlet with the standard lookup code: try { javax.naming.Context jndictx = new InitialContext(); if (jndictx == null) throw new Exception(Boom - No Context); DataSource ds = (DataSource) jndictx.lookup(java:comp/env/jdbc/TestDB); if (ds != null) { [..] i get no exception but i also dont get any reference returned from lookup. I read tons of websites including the tomcat JNDI howto, without beeing able to understand it better (in fact it gets worse cause of thousands of combinations in the web for server.xml and web.xml) When i leave out factory in the server.xml, i get a tyrex exception regarding loading a factory... I just thought that using a datasource is better than just calling the DriverManager, but the effort seems amazing... or i am too unclever... whatever... thx for help. --- greetings from Marc Logemann Homebase @ www.logemann.info -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
RE: plain MySQL DataSource in Tomcat (i know, damn topic)
Hiya, My understanding is that the default pool was tyrex which has been dropped in favour of dbcp in more recent TC builds - I'm not sure when this happened but the docs have def. changed recently. Also, the tyrex pool isnt really a pool from what I can gather and some impls seem to have a hard coded ref to the hqsl driver - I never managed to get tyrex to work which is why I favour DBCP (read: I got it working) Clay - I'm not that familiar with Struts but I'd guess that JNDI datasources are more standard than the struts way? Not sure But if you get a good solution using JNDI can you let me know and I'll patch it onto the end of the JNDI datasources example doc thats hust made it into CVS :-) Les -Original Message- From: Clay Graham [mailto:[EMAIL PROTECTED]] Sent: 03 July 2002 05:28 To: 'Tomcat Users List' Subject: RE: plain MySQL DataSource in Tomcat (i know, damn topic) Cindy, you rock and are very helpful...I had great success using the STRUTS pooling, so I am a little disappointed that isn't working for me right now does anyone know if the STRUTS pool is better than the new JNDI pools, or worse? just fishing LOVE YOU ALL! clay -Original Message- From: Cindy Ballreich [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 11:28 AM To: Tomcat Users List Subject: RE: plain MySQL DataSource in Tomcat (i know, damn topic) Hi Clay, It's a small net. I hope you are well!! I haven't tried using Struts yet, but I've been thinking about checking it out. I did try the JNDI/DBCP method described at the URL you posted and it does work and it seemed to be pooling correctly. However, the connection times out after a while which is a real pain. I haven't had time to figure out what's going on with that and work out fix for it yet. Also, DBCP seems a little immature to me at this point, so I'll probably wait a little while and try that again. I also tried the JNDI/Tyrex setup and was able to get a connection, but I couldn't tell if it was pooling properly and I ran into some bugs with Tyrex so I abandoned that approach. I've been using DbConnectionBroker using a set up similar to that described in Bergsten's Java Server Pages book. The connection is stable and the pooling is working well. I don't know how much of a load this will handle, but for the time being it's allowing me to concentrate on other things. I'd much rather be using JNDI, but I think that this is the most stable approach going right now. I hope this is at least a little bit helpful. Hang in there Cindy (sorry for the top post) At 08:33 AM 7/2/02 -0700, Clay Graham wrote: Are alot of people having problems with the mySql drivers or am I being myopic... i tried to do this with STRUTS datasource pooling and had the following issues... I am asking a question because I am very suprised at an unexepected behaviour and thought that someone may have a hint. I have linux 7.1 tomcat 404 ant struts 102 working and they have been tested, and I am taking the next step by starting to connect to my MySql database, all goodness. So my first step was to add the datasource in my struts-config.xml as follows: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=The Test Datasource/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=/ set-property property=url value=jdbc:mysql://localhost/test/ set-property property=user value=root/ /data-source /data-sources the next step was to add the mm.mysql-2.0.6.1.jar to my project's WEB-INF/lib directory, the standard approach [clay@meis test]$ jar -tvf test.war|grep mm.mysql 390333 Sun Jun 30 16:20:20 PDT 2002 WEB-INF/lib/mm.mysql-2.0.6.1.jar I am sure this JAR has the mysql driver in it: [clay@meis test]$ jar -tvf web/WEB-INF/lib/mm.mysql-2.0.6.1.jar |grep Driver 15163 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.java 5443 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.class so when I install the application using ant the following error occurs: - Root Cause - java.sql.SQLException: open: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver I have even put mm.mysql-2.0.6.1.jar in tomcat/common/lib and it does not find the driver. I am asking this question on this list because it happens in struts-config.xml so now I am looking into going over to the JNDI approach
RE: plain MySQL DataSource in Tomcat (i know, damn topic)
http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2 :-) -Original Message- From: Marc Logemann [mailto:[EMAIL PROTECTED]] Sent: 02 July 2002 13:35 To: [EMAIL PROTECTED] Subject: plain MySQL DataSource in Tomcat (i know, damn topic) Hi, i am one of the guys trying to get a valid MysqlDataSource reference via JNDI. But i am getting crazy without knowing where the problem is (perhaps the reason is, i cant debug JNDI too good, cause i am no expert in it..) i have the following: server.xml -- context Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/value /parameter parameter nameuser/namevalueroot/value /parameter parameter namepassword/namevalue/value /parameter parameter namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.opti onal.MysqlDataSource/value/parameter parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/ value /parameter /ResourceParams /context web.xml --- web-app resource-ref descriptionDataSource MySQL/description res-ref-namejdbc/TestDB/res-ref-name res-type javax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app i placed the mysql mm jar into commons/lib When i run a servlet with the standard lookup code: try { javax.naming.Context jndictx = new InitialContext(); if (jndictx == null) throw new Exception(Boom - No Context); DataSource ds = (DataSource) jndictx.lookup(java:comp/env/jdbc/TestDB); if (ds != null) { [..] i get no exception but i also dont get any reference returned from lookup. I read tons of websites including the tomcat JNDI howto, without beeing able to understand it better (in fact it gets worse cause of thousands of combinations in the web for server.xml and web.xml) When i leave out factory in the server.xml, i get a tyrex exception regarding loading a factory... I just thought that using a datasource is better than just calling the DriverManager, but the effort seems amazing... or i am too unclever... whatever... thx for help. --- greetings from Marc Logemann Homebase @ www.logemann.info -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: plain MySQL DataSource in Tomcat (i know, damn topic)
Are alot of people having problems with the mySql drivers or am I being myopic... i tried to do this with STRUTS datasource pooling and had the following issues... I am asking a question because I am very suprised at an unexepected behaviour and thought that someone may have a hint. I have linux 7.1 tomcat 404 ant struts 102 working and they have been tested, and I am taking the next step by starting to connect to my MySql database, all goodness. So my first step was to add the datasource in my struts-config.xml as follows: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=The Test Datasource/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=/ set-property property=url value=jdbc:mysql://localhost/test/ set-property property=user value=root/ /data-source /data-sources the next step was to add the mm.mysql-2.0.6.1.jar to my project's WEB-INF/lib directory, the standard approach [clay@meis test]$ jar -tvf test.war|grep mm.mysql 390333 Sun Jun 30 16:20:20 PDT 2002 WEB-INF/lib/mm.mysql-2.0.6.1.jar I am sure this JAR has the mysql driver in it: [clay@meis test]$ jar -tvf web/WEB-INF/lib/mm.mysql-2.0.6.1.jar |grep Driver 15163 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.java 5443 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.class so when I install the application using ant the following error occurs: - Root Cause - java.sql.SQLException: open: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver I have even put mm.mysql-2.0.6.1.jar in tomcat/common/lib and it does not find the driver. I am asking this question on this list because it happens in struts-config.xml so now I am looking into going over to the JNDI approach using the guide at: http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2 but I am interested if there advantages to the JNDO pool ober the STRUTS pool if I go to all this trouble? this seems like something alot people would care about. Clay -Original Message- From: Marc Logemann [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 5:35 AM To: [EMAIL PROTECTED] Subject:plain MySQL DataSource in Tomcat (i know, damn topic) Hi, i am one of the guys trying to get a valid MysqlDataSource reference via JNDI. But i am getting crazy without knowing where the problem is (perhaps the reason is, i cant debug JNDI too good, cause i am no expert in it..) i have the following: server.xml -- context Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/va lue /parameter parameter nameuser/namevalueroot/value /parameter parameter namepassword/namevalue/value /parameter parameter namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.optional.Mysql DataSource/value/parameter parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value /parameter /ResourceParams /context web.xml --- web-app resource-ref descriptionDataSource MySQL/description res-ref-namejdbc/TestDB/res-ref-name res-type javax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app i placed the mysql mm jar into commons/lib When i run a servlet with the standard lookup code: try { javax.naming.Context jndictx = new InitialContext(); if (jndictx == null) throw new Exception(Boom - No Context); DataSource ds = (DataSource) jndictx.lookup(java:comp/env/jdbc/TestDB); if (ds != null) { [..] i get no exception but i also dont get any reference returned from lookup. I read tons of websites including the tomcat JNDI howto, without beeing able to understand it better (in fact it gets worse cause of thousands of combinations in the web for server.xml and web.xml) When i leave out factory in the server.xml, i get a tyrex exception regarding loading a factory... I just thought that using a datasource is better than just calling the DriverManager, but the effort seems amazing... or i am too unclever... whatever... thx for help. --- greetings from Marc Logemann Homebase @ www.logemann.info -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] .org For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: plain MySQL DataSource in Tomcat (i know, damn topic)
Hove you tried to use the mm jdbc driver with JDBCRealm? I have been trying to get the JDBCRealm to work with this driver. I've settled for the jdbc:odbc driver for now, but would be very interested to see if/how anyone got the mm jdbc driver to work with JDBCRealm. Thanks. Dmitry Les Hughes [EMAIL PROTECTED] wrote: http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2 :-) -Original Message- From: Marc Logemann [mailto:[EMAIL PROTECTED]] Sent: 02 July 2002 13:35 To: [EMAIL PROTECTED] Subject: plain MySQL DataSource in Tomcat (i know, damn topic) Hi, i am one of the guys trying to get a valid MysqlDataSource reference via JNDI. But i am getting crazy without knowing where the problem is (perhaps the reason is, i cant debug JNDI too good, cause i am no expert in it..) i have the following: server.xml -- type=javax.sql.DataSource/ factory org.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory userroot password driverClassNameorg.gjt.mm.mysql.jdbc2.opti onal.MysqlDataSource driverNamejdbc:mysql://localhost/maxbahr value web.xml --- DataSource MySQL jdbc/TestDB javax.sql.DataSource Container i placed the mysql mm jar into commons/lib When i run a servlet with the standard lookup code: try { javax.naming.Context jndictx = new InitialContext(); if (jndictx == null) throw new Exception(Boom - No Context); DataSource ds = (DataSource) jndictx.lookup(java:comp/env/jdbc/TestDB); if (ds != null) { [..] i get no exception but i also dont get any reference returned from lookup. I read tons of websites including the tomcat JNDI howto, without beeing able to understand it better (in fact it gets worse cause of thousands of combinations in the web for server.xml and web.xml) When i leave out factory in the server.xml, i get a tyrex exception regarding loading a factory... I just thought that using a datasource is better than just calling the DriverManager, but the effort seems amazing... or i am too unclever... whatever... thx for help. --- greetings from Marc Logemann Homebase @ www.logemann.info -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? New! SBC Yahoo! Dial - 1st Month Free unlimited access
RE: plain MySQL DataSource in Tomcat (i know, damn topic)
Hi Clay, It's a small net. I hope you are well!! I haven't tried using Struts yet, but I've been thinking about checking it out. I did try the JNDI/DBCP method described at the URL you posted and it does work and it seemed to be pooling correctly. However, the connection times out after a while which is a real pain. I haven't had time to figure out what's going on with that and work out fix for it yet. Also, DBCP seems a little immature to me at this point, so I'll probably wait a little while and try that again. I also tried the JNDI/Tyrex setup and was able to get a connection, but I couldn't tell if it was pooling properly and I ran into some bugs with Tyrex so I abandoned that approach. I've been using DbConnectionBroker using a set up similar to that described in Bergsten's Java Server Pages book. The connection is stable and the pooling is working well. I don't know how much of a load this will handle, but for the time being it's allowing me to concentrate on other things. I'd much rather be using JNDI, but I think that this is the most stable approach going right now. I hope this is at least a little bit helpful. Hang in there Cindy (sorry for the top post) At 08:33 AM 7/2/02 -0700, Clay Graham wrote: Are alot of people having problems with the mySql drivers or am I being myopic... i tried to do this with STRUTS datasource pooling and had the following issues... I am asking a question because I am very suprised at an unexepected behaviour and thought that someone may have a hint. I have linux 7.1 tomcat 404 ant struts 102 working and they have been tested, and I am taking the next step by starting to connect to my MySql database, all goodness. So my first step was to add the datasource in my struts-config.xml as follows: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=The Test Datasource/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=/ set-property property=url value=jdbc:mysql://localhost/test/ set-property property=user value=root/ /data-source /data-sources the next step was to add the mm.mysql-2.0.6.1.jar to my project's WEB-INF/lib directory, the standard approach [clay@meis test]$ jar -tvf test.war|grep mm.mysql 390333 Sun Jun 30 16:20:20 PDT 2002 WEB-INF/lib/mm.mysql-2.0.6.1.jar I am sure this JAR has the mysql driver in it: [clay@meis test]$ jar -tvf web/WEB-INF/lib/mm.mysql-2.0.6.1.jar |grep Driver 15163 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.java 5443 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.class so when I install the application using ant the following error occurs: - Root Cause - java.sql.SQLException: open: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver I have even put mm.mysql-2.0.6.1.jar in tomcat/common/lib and it does not find the driver. I am asking this question on this list because it happens in struts-config.xml so now I am looking into going over to the JNDI approach using the guide at: http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2 but I am interested if there advantages to the JNDO pool ober the STRUTS pool if I go to all this trouble? this seems like something alot people would care about. Clay -Original Message- From: Marc Logemann [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 5:35 AM To:[EMAIL PROTECTED] Subject: plain MySQL DataSource in Tomcat (i know, damn topic) Hi, i am one of the guys trying to get a valid MysqlDataSource reference via JNDI. But i am getting crazy without knowing where the problem is (perhaps the reason is, i cant debug JNDI too good, cause i am no expert in it..) i have the following: server.xml -- context Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/va lue /parameter parameter nameuser/namevalueroot/value /parameter parameter namepassword/namevalue/value /parameter parameter namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.optional.Mysql DataSource/value/parameter parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value /parameter /ResourceParams /context web.xml --- web-app resource-ref descriptionDataSource MySQL/description res-ref-namejdbc/TestDB/res-ref-name res-type javax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app i placed the mysql mm jar into commons/lib When
RE: plain MySQL DataSource in Tomcat (i know, damn topic)
Cindy, you rock and are very helpful...I had great success using the STRUTS pooling, so I am a little disappointed that isn't working for me right now does anyone know if the STRUTS pool is better than the new JNDI pools, or worse? just fishing LOVE YOU ALL! clay -Original Message- From: Cindy Ballreich [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 11:28 AM To: Tomcat Users List Subject:RE: plain MySQL DataSource in Tomcat (i know, damn topic) Hi Clay, It's a small net. I hope you are well!! I haven't tried using Struts yet, but I've been thinking about checking it out. I did try the JNDI/DBCP method described at the URL you posted and it does work and it seemed to be pooling correctly. However, the connection times out after a while which is a real pain. I haven't had time to figure out what's going on with that and work out fix for it yet. Also, DBCP seems a little immature to me at this point, so I'll probably wait a little while and try that again. I also tried the JNDI/Tyrex setup and was able to get a connection, but I couldn't tell if it was pooling properly and I ran into some bugs with Tyrex so I abandoned that approach. I've been using DbConnectionBroker using a set up similar to that described in Bergsten's Java Server Pages book. The connection is stable and the pooling is working well. I don't know how much of a load this will handle, but for the time being it's allowing me to concentrate on other things. I'd much rather be using JNDI, but I think that this is the most stable approach going right now. I hope this is at least a little bit helpful. Hang in there Cindy (sorry for the top post) At 08:33 AM 7/2/02 -0700, Clay Graham wrote: Are alot of people having problems with the mySql drivers or am I being myopic... i tried to do this with STRUTS datasource pooling and had the following issues... I am asking a question because I am very suprised at an unexepected behaviour and thought that someone may have a hint. I have linux 7.1 tomcat 404 ant struts 102 working and they have been tested, and I am taking the next step by starting to connect to my MySql database, all goodness. So my first step was to add the datasource in my struts-config.xml as follows: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=The Test Datasource/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=/ set-property property=url value=jdbc:mysql://localhost/test/ set-property property=user value=root/ /data-source /data-sources the next step was to add the mm.mysql-2.0.6.1.jar to my project's WEB-INF/lib directory, the standard approach [clay@meis test]$ jar -tvf test.war|grep mm.mysql 390333 Sun Jun 30 16:20:20 PDT 2002 WEB-INF/lib/mm.mysql-2.0.6.1.jar I am sure this JAR has the mysql driver in it: [clay@meis test]$ jar -tvf web/WEB-INF/lib/mm.mysql-2.0.6.1.jar |grep Driver 15163 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.java 5443 Sat Jun 16 09:20:28 PDT 2001 mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.class so when I install the application using ant the following error occurs: - Root Cause - java.sql.SQLException: open: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver I have even put mm.mysql-2.0.6.1.jar in tomcat/common/lib and it does not find the driver. I am asking this question on this list because it happens in struts-config.xml so now I am looking into going over to the JNDI approach using the guide at: http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2 but I am interested if there advantages to the JNDO pool ober the STRUTS pool if I go to all this trouble? this seems like something alot people would care about. Clay -Original Message- From: Marc Logemann [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 5:35 AM To:[EMAIL PROTECTED] Subject: plain MySQL DataSource in Tomcat (i know, damn topic) Hi, i am one of the guys trying to get a valid MysqlDataSource reference via JNDI. But i am getting crazy without knowing where the problem is (perhaps the reason is, i cant debug JNDI too good, cause i am no expert in it..) i have the following: server.xml -- context Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namefactory/name valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/va lue /parameter parameter nameuser/namevalueroot/value /parameter parameter namepassword/namevalue/value