Re: Tomcat/MySQL Application Update
Sounds like something WebStart can do very nice for you. Create a java app, which installs a .war file in the right location. Add a .war file as a resource to the webstart application. Put the webstart app in the startup-folder of windows. Or let the webstart app launch the Tomcat. You can even add Tomcat to webstart, so Tomcat updates are distributed automaticly. Ronald. On Wed Aug 10 01:56:43 CEST 2005 Tomcat Users List tomcat-user@jakarta.apache.org wrote: We have a servlet that is run locally on about 20 laptops. I am currently manually updating the application on each laptop about once per month. Can anyone suggest a method of updating an application running on both OS/X and Windows based machines that would check if a new version was available and then grab it via FTP, Rsync, or something? Or would it be easiest to put the application into a database record? Any help or pointers appreciated. Thanks, -Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat/MySQL Application Update
We have a servlet that is run locally on about 20 laptops. I am currently manually updating the application on each laptop about once per month. Can anyone suggest a method of updating an application running on both OS/X and Windows based machines that would check if a new version was available and then grab it via FTP, Rsync, or something? Or would it be easiest to put the application into a database record? Any help or pointers appreciated. Thanks, -Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat/MySQL Application Update
From: Christopher Molnar [EMAIL PROTECTED] Sent: Tuesday, August 09, 2005 4:56 PM We have a servlet that is run locally on about 20 laptops. I am currently manually updating the application on each laptop about once per month. Can anyone suggest a method of updating an application running on both OS/X and Windows based machines that would check if a new version was available and then grab it via FTP, Rsync, or something? Or would it be easiest to put the application into a database record? Any help or pointers appreciated. Since you're on a laptop, I'm guessing you can't easily automate the process using a cron job or the Window Scheduler, as most laptops aren't up and about in the middle of the night. But, even if it was a manually initiated sync process, it wouldn't be to problematic. You could simply have the user kick off an rsync process at some reasonably regular interval and compare the WAR on their system to the Mater WAR is on your server. If the app is small, your network fast, and you can mount where the Master WAR as a drive on the computer, then you can simply have an Ant task copy the file. It can simply compare timestamps (assuming the machines have compatible clocks), and just suck the whole thing over if the timestamps differ. Hmm, well, you'd need to blow away the old exploded webapp too. That's a bit of a nut. Then, once copied over, Tomcat fires up, explodes the WAR and you're on your merry way. The only hard part is if you perhaps change the DB schema or somesuch thing outside the scope of the application, that brings on a whole different set of problems. Another solution is to embed tomcat, and your app within it, and then use Java Webstart to run it like a desktop appliation. The Webstart handles synchronizing and keep the application up to date. It probably wouldn't be horribly difficult to do, but it's not clear that the effort is worth it just to get the Webstart functionality. Finally, you can add a bit of code to your app to see if it's out of sync, download it your self, then quit with a message saying Updated -- please restart. All sorts of scary things you can do. Since you're talking OS/X and Windows, I'd keep the solutions to Java based ones, tho, rather relying on scripting and such. Luck! Regards, Will Hartung ([EMAIL PROTECTED]) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat/MySQL Application Update
Christopher, We have a servlet that is run locally on about 20 laptops. I am currently manually updating the application on each laptop about once per month. Can anyone suggest a method of updating an application running on both OS/X and Windows based machines that would check if a new version was available and then grab it via FTP, Rsync, or something? Or would it be easiest to put the application into a database record? Any help or pointers appreciated. One option, amongst many, is to store the application as a binary file in a database record. This would allow you to add other information to the record. A user could then, using a web page, download the file. Just a thought. Stephen Caine Soft Breeze Systems, LLC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
apache/tomcat/mysql cluster info request
Good Morning, I'm looking for suggestions on a large scale tomcat cluster for one deployed app. I currently run our app happily with all server apps smushed on one server. Apache webserver 2.0.52/mod_jk/tomcat5.0.28/mysql 4.1.7 on Fedora Core 3. My company wants to deploy a site that would generate a huge amount of traffic. Lots of huge files, lot's of CPU use. I've been reading the online resources for cluster set ups but I still have some questions I'm hoping someone who has a successful cluster can help with. I'd like a set up that has redundant pipes, so a horizontal cluster on all tiers is important for growth and fail over. I'm trying to find information about a setup that uses a hardware loadbalancer in front of multiple apache webservers that are in front of mutliple tomcat app servers with a MySQL master/slave at the back. I'm thinking the tomcat servers may need to be connected to the application data filesystem via a NAS. I'm not sure about the performance hit, but it is critical that the data served is shared. I've read a bunch of great articles on using the apache webserver as the loadbalancer for the tomcat cluster, but I'm concerned about the webserver failing. Plus I use the webserver tier for rewrite flexibility. I think I want to start with two of each tier(web server, application server, database server), with multiple tomcat engines running on the application servers on some memory rich hardware. From my current setup my load tests have always shown the bottleneck to be java memory use (jdk 1.5) Thank you for your time. -Kiarna
Tomcat + mysql + axis
Hi, I'm newbie of Web service and I want to do a web service wich inserts data into a mysql database I dont't know if I need to configue server.xml and web.xml files? (I work with Tomcat) I've read jndi-datasource-examples-howto.html, but it's a servlet example and I don't know if it is identical to a simple webservice -- Regars, Daniel mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat + mysql + axis
On Tue, Sep 21, 2004 at 04:27:43PM +0200, Daniel S?nchez G?mez wrote: : I'm newbie of Web service and I want to do a web service wich : inserts data into a mysql database : : I dont't know if I need to configue server.xml and web.xml files? (I : work with Tomcat) : : I've read jndi-datasource-examples-howto.html, but it's a servlet : example and I don't know if it is identical to a simple webservice Web services, servlets, whatever... if it runs inside Tomcat, you can use the examples in the doc you read. -QM -- software -- http://www.BrandXDev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
looking for tomcat/mysql examples
Hello again. In a couple of weeks, I am giving a seminar on installing and configuring software to create an open-source web site. This is to be a hands-on lab with the attendees actually installing and configuring the software. It's an all day affair. The software I'm using for this program includes: SuSE Standard Server 8.0 openssl 0.9.7d Apache HTTPD 2.0.50 Sun Java j2sdk-1_4_2_05 Jakarta Tomcat 4.1.30 Jakarta Tomcat Connector jk2-2.0.4 MySQL 4.0.20 I need one more thing for this. I'd like to find a simple application demonstrating the accessing of a MySQL database from the web via a tomcat application. Either a JSP or a servlet (which ever is simpler.) Does anyone have any suggestions where I can find such an application (or have any code they wish to donate to my cause?) Thanks again for the help Harold -- Harold Pritchett [EMAIL PROTECTED]+1.706.546.0692 pgp public key: http://www.arches.uga.edu/~harold/pgpkey.html They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. Benjamin Franklin, Historical Review of Pennsylvania, 1759. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: looking for tomcat/mysql examples
Hi, Maybe something like this would be helpful for you: http://www.developer.com/java/data/print.php/10932_2172891_3. As far as Tomcat is concerned, all DBs are the same. Tomcat provides support for connection pooling for J2EE DataSources. By default the implementation uses DBCP (http://jakarta.apache.org/commons/dbcp). The Tomcat DataSources how-to has MySQL configuration examples: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples -howto.html. The application code is standard again, not specific to Tomcat or MySQL. Any JDBC app will do. Yoav Shapira Millennium Research Informatics -Original Message- From: Harold Pritchett [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 3:55 PM To: Tomcat Users List Subject: looking for tomcat/mysql examples Hello again. In a couple of weeks, I am giving a seminar on installing and configuring software to create an open-source web site. This is to be a hands-on lab with the attendees actually installing and configuring the software. It's an all day affair. The software I'm using for this program includes: SuSE Standard Server 8.0 openssl 0.9.7d Apache HTTPD 2.0.50 Sun Java j2sdk-1_4_2_05 Jakarta Tomcat 4.1.30 Jakarta Tomcat Connector jk2-2.0.4 MySQL 4.0.20 I need one more thing for this. I'd like to find a simple application demonstrating the accessing of a MySQL database from the web via a tomcat application. Either a JSP or a servlet (which ever is simpler.) Does anyone have any suggestions where I can find such an application (or have any code they wish to donate to my cause?) Thanks again for the help Harold -- Harold Pritchett [EMAIL PROTECTED]+1.706.546.0692 pgp public key: http://www.arches.uga.edu/~harold/pgpkey.html They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. Benjamin Franklin, Historical Review of Pennsylvania, 1759. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat - MySQL = No suitable driver ERROR
yes patrick, i guess that is what david and i want so your dbtest works. allthough the posted contents of web.xml lack a doctype or schema definition (see hassans post). now, have you tried this? cheers, jan -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 7:59 PM To: 'Tomcat Users List' Cc: '[EMAIL PROTECTED]' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Ok, the contents of {TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml is: Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context Contents of {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml is: web-app descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Is this what you wanted? -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 10:25 AM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Hold on a minute. I think we have a communication problem here. I wasn't recommending you do that. Slow down, take a breath and read my posts VERY carefully. We are looking at two different files here. DBTest.xml as a file containing the Context.../Context stuff should be in {TOMCAT_HOME}/conf/Catalina/localhost. Leave that alone. I was recommending you take the resource-ref.../resource-ref stuff you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml. Both files are needed with their respective parts. The context definition needs to have the Resource/ and ResourceParams.../ResourceParams sections to define a connection pool and make it available in tomcat's JNDI name space. web.xml needs the resource-ref.../resource-ref stuff to make the connection pool avialable to your application. --David Briggs, Patrick wrote: Ok, I tried as you suggested, I deleted DBTest.xml out of the conf/Catalina/localhost directory and placed it inside my web.xml for the webapp itself. I rebooted my machine, restarted Tomcat, same error. Still nothing. Here is what my web.xml looks like now: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter
RE: Tomcat - MySQL = No suitable driver ERROR
David had me do this following proceedure and that seemed to work, but my JSP does not return any data so far. The database finally connected though. When I view this JSP page, all it prints is: ${row.foo} ${row.bar} instead of the data that should be contained inside those variables. test.jsp: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/DBTest select * from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} c:out value=${row.foo}/ c:out value=${row.bar}/ /c:forEach /body /html From David: Here's first what should be in {TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml: Context path=/DBTest docBase=DBTest debug=0 privileged=false !-- Loggers, valves, other stuff here -- Resource name=jdbc/DbTest auth=container type=javax.sql.DataSource/ ResourceParams name=jdbc/DbTest parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value10/value /parameter !-- Customize with your database username -- parameter nameusername/name valueDBTestUser/value /parameter !-- Customize with your database password here -- parameter namepassword/name value*/value parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter !-- Customize with your mysql url -- parameter nameurl/name valuejdbc:mysql://localhost:3306/DBTest?autoReconnect=true/value /parameter /ResourceParams /Context - Ok, now what should be in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameDbTest Application/display-name !-- All your servlet definitions, mappings, welcome file specs, taglibs, etc, ... are placed here. -- !--+ resource-ref here to make the database pool available in this application +-- resource-ref descriptionDBTest Database/description res-ref-namejdbc/DbTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - This exact formula has worked for me in I can't even count how many apps I've setup. --David -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 1:50 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR yes patrick, i guess that is what david and i want so your dbtest works. allthough the posted contents of web.xml lack a doctype or schema definition (see hassans post). now, have you tried this? cheers, jan This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
RE: Tomcat - MySQL = No suitable driver ERROR
Good to hear that it is finally working. I am sorry, but I have never used any sql tag-lib so I can't really help you with this problem. I would suggest though, to google for a simple example - if that doesn't help open a new thread here in the list and ask specifically for help with your new problem. I am sure that someone will know... Jan -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 6:36 PM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR David had me do this following proceedure and that seemed to work, but my JSP does not return any data so far. The database finally connected though. When I view this JSP page, all it prints is: ${row.foo} ${row.bar} instead of the data that should be contained inside those variables. test.jsp: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/DBTest select * from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} c:out value=${row.foo}/ c:out value=${row.bar}/ /c:forEach /body /html From David: Here's first what should be in {TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml: Context path=/DBTest docBase=DBTest debug=0 privileged=false !-- Loggers, valves, other stuff here -- Resource name=jdbc/DbTest auth=container type=javax.sql.DataSource/ ResourceParams name=jdbc/DbTest parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value10/value /parameter !-- Customize with your database username -- parameter nameusername/name valueDBTestUser/value /parameter !-- Customize with your database password here -- parameter namepassword/name value*/value parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter !-- Customize with your mysql url -- parameter nameurl/name valuejdbc:mysql://localhost:3306/DBTest?autoReconnect=true/value /parameter /ResourceParams /Context - Ok, now what should be in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameDbTest Application/display-name !-- All your servlet definitions, mappings, welcome file specs, taglibs, etc, ... are placed here. -- !--+ resource-ref here to make the database pool available in this application +-- resource-ref descriptionDBTest Database/description res-ref-namejdbc/DbTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app - This exact formula has worked for me in I can't even count how many apps I've setup. --David -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Friday, July 02, 2004 1:50 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR yes patrick, i guess that is what david and i want so your dbtest works. allthough the posted contents of web.xml lack a doctype or schema definition (see hassans post). now, have you tried this? cheers, jan This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat - MySQL = No suitable driver ERROR
David is right, you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to {Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up and running. Jan -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 3:56 AM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Ok. I think I'm seeing your trouble. The stuff you have in WEB-INF/DB-Test.xml should be in web.xml instead. In mine, the resource-ref.../resource-ref stuff is at the end of the file just before the closing /web-app tag. In tomcat versions 3 and 4, the order of elements in web.xml was important. I believe that requirement has been lifted in tomcat 5. --David Try that and see what happens. --David Briggs, Patrick wrote: I'm using an example someone else on this list gave me. So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Contents of {Catalina_Home/webapps/DBTest/test.jsp: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/DBTest select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} Foo ${row.foo}br/ Bar ${row.bar}br/ /c:forEach /body /html The error message displayed on the web-broser for the URL: http://localhost:8080/DBTest/test.jsp javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon textI mpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte xtImp l.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnectio n(Unk nown Source) org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(U nknow n Source) org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100) org.apache.jsp.test_jsp._jspService(test_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810
RE: Tomcat - MySQL = No suitable driver ERROR
Ok, I tried as you suggested, I deleted DBTest.xml out of the conf/Catalina/localhost directory and placed it inside my web.xml for the webapp itself. I rebooted my machine, restarted Tomcat, same error. Still nothing. Here is what my web.xml looks like now: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context /web-app -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 6:56 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Ok. I think I'm seeing your trouble. The stuff you have in WEB-INF/DB-Test.xml should be in web.xml instead. In mine, the resource-ref.../resource-ref stuff is at the end of the file just before the closing /web-app tag. In tomcat versions 3 and 4, the order of elements in web.xml was important. I believe that requirement has been lifted in tomcat 5. --David Try that and see what happens. --David Briggs, Patrick wrote: I'm using an example someone else on this list gave me. So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Contents of {Catalina_Home/webapps/DBTest/test.jsp: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/DBTest select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows
RE: Tomcat - MySQL = No suitable driver ERROR
Yeah, I just tried that and still no go. Still getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 1:04 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR David is right, you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to {Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up and running. Jan -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 3:56 AM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Ok. I think I'm seeing your trouble. The stuff you have in WEB-INF/DB-Test.xml should be in web.xml instead. In mine, the resource-ref.../resource-ref stuff is at the end of the file just before the closing /web-app tag. In tomcat versions 3 and 4, the order of elements in web.xml was important. I believe that requirement has been lifted in tomcat 5. --David Try that and see what happens. --David Briggs, Patrick wrote: I'm using an example someone else on this list gave me. So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Contents of {Catalina_Home/webapps/DBTest/test.jsp: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/DBTest select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} Foo ${row.foo}br/ Bar ${row.bar}br/ /c:forEach /body /html The error message displayed on the web-broser for the URL: http://localhost:8080/DBTest/test.jsp javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCon textI mpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageConte xtImp l.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j ava:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
RE: Tomcat - MySQL = No suitable driver ERROR
I have seen this one too many times. It usually has to do with the naming lookup. I have had to keep playing with the form of the name until it worked. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 10:20 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Yeah, I just tried that and still no go. Still getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 1:04 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR David is right, you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to {Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up and running. Jan -Original Message- [snip] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat - MySQL = No suitable driver ERROR
Why does it have to be so difficult? Pretty soon I'll have to give up and go back to PHP. What I really want to do is try out Javaserver Faces. -Original Message- From: Robert Harper [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 9:38 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR I have seen this one too many times. It usually has to do with the naming lookup. I have had to keep playing with the form of the name until it worked. Robert S. Harper 801.265.8800 ex. 255 -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 10:20 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Yeah, I just tried that and still no go. Still getting: javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 1:04 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR David is right, you will need to rename {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml to {Catalina_Home}/webapps/DBTest/WEB-INF/web.xml and hopefully all will be up and running. Jan -Original Message- [snip] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
Re: Tomcat - MySQL = No suitable driver ERROR
Hold on a minute. I think we have a communication problem here. I wasn't recommending you do that. Slow down, take a breath and read my posts VERY carefully. We are looking at two different files here. DBTest.xml as a file containing the Context.../Context stuff should be in {TOMCAT_HOME}/conf/Catalina/localhost. Leave that alone. I was recommending you take the resource-ref.../resource-ref stuff you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml. Both files are needed with their respective parts. The context definition needs to have the Resource/ and ResourceParams.../ResourceParams sections to define a connection pool and make it available in tomcat's JNDI name space. web.xml needs the resource-ref.../resource-ref stuff to make the connection pool avialable to your application. --David Briggs, Patrick wrote: Ok, I tried as you suggested, I deleted DBTest.xml out of the conf/Catalina/localhost directory and placed it inside my web.xml for the webapp itself. I rebooted my machine, restarted Tomcat, same error. Still nothing. Here is what my web.xml looks like now: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context /web-app -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 6:56 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Ok. I think I'm seeing your trouble. The stuff you have in WEB-INF/DB-Test.xml should be in web.xml instead. In mine, the resource-ref.../resource-ref stuff is at the end of the file just before the closing /web-app tag. In tomcat versions 3 and 4, the order of elements in web.xml was important. I believe that requirement has been lifted in tomcat 5. --David Try that and see what happens. --David Briggs, Patrick wrote: I'm using an example someone else on this list gave me. So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http
Re: Tomcat - MySQL = No suitable driver ERROR
David Smith wrote: I was recommending you take the resource-ref.../resource-ref stuff you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml. Yes, and in addition -- Here is what my web.xml looks like now: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description ?! You've got a 2.3 DOCTYPE and a 2.4 schema reference in the same file, which is /seriously/ wrong. :-) You want one or the other. FWIW! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat - MySQL = No suitable driver ERROR
Ok, the contents of {TOMCAT_HOME}/conf/Catalina/localhost/DBTest.xml is: Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context Contents of {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml is: web-app descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Is this what you wanted? -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, July 01, 2004 10:25 AM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Hold on a minute. I think we have a communication problem here. I wasn't recommending you do that. Slow down, take a breath and read my posts VERY carefully. We are looking at two different files here. DBTest.xml as a file containing the Context.../Context stuff should be in {TOMCAT_HOME}/conf/Catalina/localhost. Leave that alone. I was recommending you take the resource-ref.../resource-ref stuff you put in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/DBTest.xml and put that in {TOMCAT_HOME}/webapps/DBTest/WEB-INF/web.xml. Both files are needed with their respective parts. The context definition needs to have the Resource/ and ResourceParams.../ResourceParams sections to define a connection pool and make it available in tomcat's JNDI name space. web.xml needs the resource-ref.../resource-ref stuff to make the connection pool avialable to your application. --David Briggs, Patrick wrote: Ok, I tried as you suggested, I deleted DBTest.xml out of the conf/Catalina/localhost directory and placed it inside my web.xml for the webapp itself. I rebooted my machine, restarted Tomcat, same error. Still nothing. Here is what my web.xml looks like now: ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context /web-app -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 6:56 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Ok. I think I'm seeing your trouble. The stuff you have in WEB-INF/DB-Test.xml should be in web.xml instead. In mine
RE: Tomcat - MySQL = No suitable driver ERROR
Hi Patrick, the problem might be that in Tomcat 5.x the storage of the context related configuration changed from server.xml to a sepparate file for each webapp. This file should be stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where Catalina_Home points to your Tomcat installation dir and domain_name usually would be localhost in a dev-environment. If you have a webapp called myWebApp and want to setup a datastore via jndi for same to use in Tomcat 5 you could use the following as a basis for a myWebApp.xml file stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=myWebApp docBase=myWebApp path=/myWebApp reloadable=true workDir=work\Catalina\localhost\myWebApp Resource auth=Container name=jdbc/myWebApp type=javax.sql.DataSource/ ResourceParams name=jdbc/myWebApp parameter nameurl/name valuejdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRec onnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueUSERNAME/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuePASSWORD/value /parameter /ResourceParams /Context The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete any other copies you might have placed in your WEB-INF\lib or anywhere else. You should also remove the context/context you inserted in server.xml as this should all go in the myWebApp.xml file. If you ever deploy your webapp you then only have to copy your myWebApp.xml to the Manifest dir in your webapp root dir before creating the war-file and Tomcat will automatically create the correct context for your webapp. HTH, Jan -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 12:01 AM To: '[EMAIL PROTECTED]' Subject: Tomcat - MySQL = No suitable driver ERROR I'm trying to setup Tomcat 5.0.25 to talk to a MySQL database and I've had no luck after several days of fighting with this thing. I'm following along the documentation at this URI: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how to.html The example says to edit server.xml Add this in between the /Context tag of the examples context and the /Host tag closing the localhost definition. So far I've not found any Context example in server.xml. So that doesn't appear to exist. However, I have placed it before the /Host tag and have also tried putting it in the GlobalNamingResources as well, but that didn't make any difference for me. I have placed the mysql-connector-java-3.0.14-production-bin.jar file in /tomcat/common/lib as instructed. I have also tried placing it WEB-INF/lib, that didn't work. Also tried putting it in tomcat/server/lib and that didn't help either. I have the impressiont that the datasource-examples-howto is somehow out of date, hasn't been really tested much, or is just plain incorrect because I've found numerous other hits on GOOGLE.COM about this problem, but nobody really has much of a solution. Seems to me that setting this up shouldn't be this complicated. The error message I keep getting all the time is: javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) Root Cause: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
RE: Tomcat - MySQL = No suitable driver ERROR
If the webapps.xml file is supposed to be located in Catalina\localhost, the apache's own website documentation JDBC-HOWTO needs to be updated to reflect that new situation. I'm surprised they haven't updated it because I'm sure a lot of other people are going to be having the same problems I am. I have made all of the changes you have suggest. the mysql.jar file has been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have now placed it. I have created a file called DBTest.xml over in /conf/Catalina/localhost/DBTest.xml I used your template for the XML find changing it where it needs changes for URL and username/password. Still getting the same error message :( So now what could it be? -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:58 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Hi Patrick, the problem might be that in Tomcat 5.x the storage of the context related configuration changed from server.xml to a sepparate file for each webapp. This file should be stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where Catalina_Home points to your Tomcat installation dir and domain_name usually would be localhost in a dev-environment. If you have a webapp called myWebApp and want to setup a datastore via jndi for same to use in Tomcat 5 you could use the following as a basis for a myWebApp.xml file stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=myWebApp docBase=myWebApp path=/myWebApp reloadable=true workDir=work\Catalina\localhost\myWebApp Resource auth=Container name=jdbc/myWebApp type=javax.sql.DataSource/ ResourceParams name=jdbc/myWebApp parameter nameurl/name valuejdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRec onnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueUSERNAME/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuePASSWORD/value /parameter /ResourceParams /Context The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete any other copies you might have placed in your WEB-INF\lib or anywhere else. You should also remove the context/context you inserted in server.xml as this should all go in the myWebApp.xml file. If you ever deploy your webapp you then only have to copy your myWebApp.xml to the Manifest dir in your webapp root dir before creating the war-file and Tomcat will automatically create the correct context for your webapp. HTH, Jan This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
Re: Tomcat - MySQL = No suitable driver ERROR
Wrong place for mysql jar file. It should be in {TOMCAT_HOME}/common/lib right along side the DBCP jar file. --David Briggs, Patrick wrote: If the webapps.xml file is supposed to be located in Catalina\localhost, the apache's own website documentation JDBC-HOWTO needs to be updated to reflect that new situation. I'm surprised they haven't updated it because I'm sure a lot of other people are going to be having the same problems I am. I have made all of the changes you have suggest. the mysql.jar file has been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have now placed it. I have created a file called DBTest.xml over in /conf/Catalina/localhost/DBTest.xml I used your template for the XML find changing it where it needs changes for URL and username/password. Still getting the same error message :( So now what could it be? -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:58 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Hi Patrick, the problem might be that in Tomcat 5.x the storage of the context related configuration changed from server.xml to a sepparate file for each webapp. This file should be stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where Catalina_Home points to your Tomcat installation dir and domain_name usually would be localhost in a dev-environment. If you have a webapp called myWebApp and want to setup a datastore via jndi for same to use in Tomcat 5 you could use the following as a basis for a myWebApp.xml file stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=myWebApp docBase=myWebApp path=/myWebApp reloadable=true workDir=work\Catalina\localhost\myWebApp Resource auth=Container name=jdbc/myWebApp type=javax.sql.DataSource/ ResourceParams name=jdbc/myWebApp parameter nameurl/name valuejdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRec onnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueUSERNAME/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuePASSWORD/value /parameter /ResourceParams /Context The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete any other copies you might have placed in your WEB-INF\lib or anywhere else. You should also remove the context/context you inserted in server.xml as this should all go in the myWebApp.xml file. If you ever deploy your webapp you then only have to copy your myWebApp.xml to the Manifest dir in your webapp root dir before creating the war-file and Tomcat will automatically create the correct context for your webapp. HTH, Jan This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat - MySQL = No suitable driver ERROR
Ok, I have it in the common/lib directory, but that didn't make a difference. You'd think there would be a lot easier way to setup stuff like this. Editing XML files is pretty tricky business. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 12:19 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Wrong place for mysql jar file. It should be in {TOMCAT_HOME}/common/lib right along side the DBCP jar file. --David Briggs, Patrick wrote: If the webapps.xml file is supposed to be located in Catalina\localhost, the apache's own website documentation JDBC-HOWTO needs to be updated to reflect that new situation. I'm surprised they haven't updated it because I'm sure a lot of other people are going to be having the same problems I am. I have made all of the changes you have suggest. the mysql.jar file has been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have now placed it. I have created a file called DBTest.xml over in /conf/Catalina/localhost/DBTest.xml I used your template for the XML find changing it where it needs changes for URL and username/password. Still getting the same error message :( So now what could it be? -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:58 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Hi Patrick, the problem might be that in Tomcat 5.x the storage of the context related configuration changed from server.xml to a sepparate file for each webapp. This file should be stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where Catalina_Home points to your Tomcat installation dir and domain_name usually would be localhost in a dev-environment. If you have a webapp called myWebApp and want to setup a datastore via jndi for same to use in Tomcat 5 you could use the following as a basis for a myWebApp.xml file stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=myWebApp docBase=myWebApp path=/myWebApp reloadable=true workDir=work\Catalina\localhost\myWebApp Resource auth=Container name=jdbc/myWebApp type=javax.sql.DataSource/ ResourceParams name=jdbc/myWebApp parameter nameurl/name valuejdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRe c onnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueUSERNAME/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuePASSWORD/value /parameter /ResourceParams /Context The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete any other copies you might have placed in your WEB-INF\lib or anywhere else. You should also remove the context/context you inserted in server.xml as this should all go in the myWebApp.xml file. If you ever deploy your webapp you then only have to copy your myWebApp.xml to the Manifest dir in your webapp root dir before creating the war-file and Tomcat will automatically create the correct context for your webapp. HTH, Jan This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
Re: Tomcat - MySQL = No suitable driver ERROR
I've set this up I don't know how many times and only ever had problems when I've mispelled the JNDI name I gave it somewhere in the 4 places it was specified. Others have had issue with the order of parameters in the ResourceParams block. To be on the safe side, follow the order of parameters given in the jndi-datasource-howto.html page you were following. That's the same page I followed when I did this for the first time. I take it you've: 1) defined a Resource/ and ResouceParams/ block in your {context}.xml file that's stored in the {TOMCAT_HOME}/conf/Catalina/localhost folder. Both Resource/ and ResourceParams.../ResourceParams sections have the same JNDI name in their name attributes. I'd recommend all lower case since case is important in java. 2) Placed a resource-ref.../resource-ref in your WEB-INF/web.xml file with the res-ref-name.../res-ref-name tag specifying the same JNDI name specified in the {context}.xml file above. I keep harping on the same JNDI name because this is where I've been messed up before. 3) Did a lookup for java:comp/env/{your JNDI name here} in your java code. 4) Restarted the tomcat service after putting the mysql jar file in common/lib so the tomcat classloaders can see it. Can you post what you do have in {context}.xml and web.xml and just omit the username and password for the database or put in bogus ones for the purposes of posting to the list? An excerpt of your java code where you attempt to access the db would be good as well. --David Briggs, Patrick wrote: Ok, I have it in the common/lib directory, but that didn't make a difference. You'd think there would be a lot easier way to setup stuff like this. Editing XML files is pretty tricky business. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 12:19 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Wrong place for mysql jar file. It should be in {TOMCAT_HOME}/common/lib right along side the DBCP jar file. --David Briggs, Patrick wrote: If the webapps.xml file is supposed to be located in Catalina\localhost, the apache's own website documentation JDBC-HOWTO needs to be updated to reflect that new situation. I'm surprised they haven't updated it because I'm sure a lot of other people are going to be having the same problems I am. I have made all of the changes you have suggest. the mysql.jar file has been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have now placed it. I have created a file called DBTest.xml over in /conf/Catalina/localhost/DBTest.xml I used your template for the XML find changing it where it needs changes for URL and username/password. Still getting the same error message :( So now what could it be? -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:58 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Hi Patrick, the problem might be that in Tomcat 5.x the storage of the context related configuration changed from server.xml to a sepparate file for each webapp. This file should be stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where Catalina_Home points to your Tomcat installation dir and domain_name usually would be localhost in a dev-environment. If you have a webapp called myWebApp and want to setup a datastore via jndi for same to use in Tomcat 5 you could use the following as a basis for a myWebApp.xml file stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=myWebApp docBase=myWebApp path=/myWebApp reloadable=true workDir=work\Catalina\localhost\myWebApp Resource auth=Container name=jdbc/myWebApp type=javax.sql.DataSource/ ResourceParams name=jdbc/myWebApp parameter nameurl/name valuejdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?autoRe c onnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueUSERNAME/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuePASSWORD/value /parameter /ResourceParams /Context The MySQL driver does have to go under {Catalina_Home}\shared\lib! Delete any other copies you might have placed in your WEB-INF\lib or anywhere else. You should also remove the context/context you inserted
RE: Tomcat - MySQL = No suitable driver ERROR
Hi Patrick, shared/lib is quite ok - that is where mine resides and everything works just fine... The content of myWebApp,xml is straight out of my one two and my db connection works just fine. The question would be when and where you actually get that error. Have you turned on logging for your webapp and ensured that the jndi ressource is really there? There should be an entry (depending on your logging level) like this there: 2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]: Adding resource ref jdbc/myWebApp 2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]: ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factory ClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shar eable},{type=auth,content=Container},{type=url,content=jdbc:mysql://loalhost :3306/myWebApp?autoReconnect=true},{type=maxIdle,content=15},{type=maxActive ,content=50},{type=driverClassName,content=com.mysql.jdbc.Driver},{type=maxW ait,content=1},{type=removeAbandoned,content=true},{type=username,conten t=myWebApp},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFac tory},{type=removeAbandonedTimeout,content=60},{type=password,content=secret }] If that does not help, add the following inside web-app of your web.xml (should be in webapps WEB-INF dir). resource-ref descriptionDB Connection/description res-ref-namejdbc/myWebApp/res-ref-name !-- exchange myWebApp with whatever you have named your datasource in the context/ -- res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Best you then delete all contents of {CATALINA_HOME}\work\localhost\myWebApp\ and restart Tomcat. Then check your logs and see whether it finds and intializes the ressource. HTH, Jan -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 9:47 PM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Ok, I have it in the common/lib directory, but that didn't make a difference. You'd think there would be a lot easier way to setup stuff like this. Editing XML files is pretty tricky business. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 12:19 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Wrong place for mysql jar file. It should be in {TOMCAT_HOME}/common/lib right along side the DBCP jar file. --David Briggs, Patrick wrote: If the webapps.xml file is supposed to be located in Catalina\localhost, the apache's own website documentation JDBC-HOWTO needs to be updated to reflect that new situation. I'm surprised they haven't updated it because I'm sure a lot of other people are going to be having the same problems I am. I have made all of the changes you have suggest. the mysql.jar file has been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have now placed it. I have created a file called DBTest.xml over in /conf/Catalina/localhost/DBTest.xml I used your template for the XML find changing it where it needs changes for URL and username/password. Still getting the same error message :( So now what could it be? -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:58 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Hi Patrick, the problem might be that in Tomcat 5.x the storage of the context related configuration changed from server.xml to a sepparate file for each webapp. This file should be stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where Catalina_Home points to your Tomcat installation dir and domain_name usually would be localhost in a dev-environment. If you have a webapp called myWebApp and want to setup a datastore via jndi for same to use in Tomcat 5 you could use the following as a basis for a myWebApp.xml file stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=myWebApp docBase=myWebApp path=/myWebApp reloadable=true workDir=work\Catalina\localhost\myWebApp Resource auth=Container name=jdbc/myWebApp type=javax.sql.DataSource/ ResourceParams name=jdbc/myWebApp parameter nameurl/name valuejdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?au toRe c onnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valueUSERNAME/value /parameter
RE: Tomcat - MySQL = No suitable driver ERROR
I'm using an example someone else on this list gave me. So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Contents of {Catalina_Home/webapps/DBTest/test.jsp: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/DBTest select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} Foo ${row.foo}br/ Bar ${row.bar}br/ /c:forEach /body /html The error message displayed on the web-broser for the URL: http://localhost:8080/DBTest/test.jsp javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk nown Source) org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow n Source) org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100) org.apache.jsp.test_jsp._jspService(test_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:33 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR I've set this up I don't know how many times and only ever had problems when I've mispelled the JNDI name I gave it somewhere in the 4 places it was specified. Others have had issue with the order of parameters in the ResourceParams block. To be on the safe side, follow the order of parameters given in the jndi-datasource-howto.html
Re: Tomcat - MySQL = No suitable driver ERROR
Ok. I think I'm seeing your trouble. The stuff you have in WEB-INF/DB-Test.xml should be in web.xml instead. In mine, the resource-ref.../resource-ref stuff is at the end of the file just before the closing /web-app tag. In tomcat versions 3 and 4, the order of elements in web.xml was important. I believe that requirement has been lifted in tomcat 5. --David Try that and see what happens. --David Briggs, Patrick wrote: I'm using an example someone else on this list gave me. So inside of {CATALINA_HOME}/conf/Catalina/localhost/DBTest.xml ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=DBtest docBase=DBTest path=/DBtest reloadable=true workDir=work\Catalina\localhost\DBTest Resource auth=Container name=jdbc/DBTest type=javax.sql.DataSource/ ResourceParams name=jdbc/DBTest parameter nameurl/name valuejdbc:mysql://cir-ops:3306/javatest?autoReconnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameusername/name valuejavauser/value /parameter parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namepassword/name valuejavadude/value /parameter /ResourceParams /Context The contents of {Catalina_Home}/webapps/DBTest/WEB-INF/DBTest.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/DBTest/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Contents of {Catalina_Home/webapps/DBTest/test.jsp: %@ taglib uri=http://java.sun.com/jsp/jstl/sql; prefix=sql % %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % sql:query var=rs dataSource=jdbc/DBTest select id, foo, bar from testdata /sql:query html head titleDB Test/title /head body h2Results/h2 c:forEach var=row items=${rs.rows} Foo ${row.foo}br/ Bar ${row.bar}br/ /c:forEach /body /html The error message displayed on the web-broser for the URL: http://localhost:8080/DBTest/test.jsp javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) root cause javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk nown Source) org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow n Source) org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100) org.apache.jsp.test_jsp._jspService(test_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:33 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable
Re: Tomcat - MySQL = No suitable driver ERROR
Ok, I stand corrected. If the jar works in shared/lib, then cool. I never argue with what works. I also stop experimenting when it starts working, so I've never tried it there. Thanks for the info. --David Jan Behrens wrote: Hi Patrick, shared/lib is quite ok - that is where mine resides and everything works just fine... The content of myWebApp,xml is straight out of my one two and my db connection works just fine. The question would be when and where you actually get that error. Have you turned on logging for your webapp and ensured that the jndi ressource is really there? There should be an entry (depending on your logging level) like this there: 2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]: Adding resource ref jdbc/myWebApp 2004-06-30 14:59:06 NamingContextListener[/Catalina/localhost/myWebApp]: ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factory ClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shar eable},{type=auth,content=Container},{type=url,content=jdbc:mysql://loalhost :3306/myWebApp?autoReconnect=true},{type=maxIdle,content=15},{type=maxActive ,content=50},{type=driverClassName,content=com.mysql.jdbc.Driver},{type=maxW ait,content=1},{type=removeAbandoned,content=true},{type=username,conten t=myWebApp},{type=factory,content=org.apache.commons.dbcp.BasicDataSourceFac tory},{type=removeAbandonedTimeout,content=60},{type=password,content=secret }] If that does not help, add the following inside web-app of your web.xml (should be in webapps WEB-INF dir). resource-ref descriptionDB Connection/description res-ref-namejdbc/myWebApp/res-ref-name !-- exchange myWebApp with whatever you have named your datasource in the context/ -- res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref Best you then delete all contents of {CATALINA_HOME}\work\localhost\myWebApp\ and restart Tomcat. Then check your logs and see whether it finds and intializes the ressource. HTH, Jan -Original Message- From: Briggs, Patrick [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 9:47 PM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Ok, I have it in the common/lib directory, but that didn't make a difference. You'd think there would be a lot easier way to setup stuff like this. Editing XML files is pretty tricky business. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 12:19 PM To: Tomcat Users List Subject: Re: Tomcat - MySQL = No suitable driver ERROR Wrong place for mysql jar file. It should be in {TOMCAT_HOME}/common/lib right along side the DBCP jar file. --David Briggs, Patrick wrote: If the webapps.xml file is supposed to be located in Catalina\localhost, the apache's own website documentation JDBC-HOWTO needs to be updated to reflect that new situation. I'm surprised they haven't updated it because I'm sure a lot of other people are going to be having the same problems I am. I have made all of the changes you have suggest. the mysql.jar file has been deleted everywhere except for {CATALINA_HOME}/shared/lib where I have now placed it. I have created a file called DBTest.xml over in /conf/Catalina/localhost/DBTest.xml I used your template for the XML find changing it where it needs changes for URL and username/password. Still getting the same error message :( So now what could it be? -Original Message- From: Jan Behrens [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 30, 2004 1:58 AM To: 'Tomcat Users List' Subject: RE: Tomcat - MySQL = No suitable driver ERROR Hi Patrick, the problem might be that in Tomcat 5.x the storage of the context related configuration changed from server.xml to a sepparate file for each webapp. This file should be stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml where Catalina_Home points to your Tomcat installation dir and domain_name usually would be localhost in a dev-environment. If you have a webapp called myWebApp and want to setup a datastore via jndi for same to use in Tomcat 5 you could use the following as a basis for a myWebApp.xml file stored under {Catalina_Home}\conf\Catalina\{domain-name}\myWebAppName.xml: ?xml version='1.0' encoding='utf-8'? Context debug=5 displayName=myWebApp docBase=myWebApp path=/myWebApp reloadable=true workDir=work\Catalina\localhost\myWebApp Resource auth=Container name=jdbc/myWebApp type=javax.sql.DataSource/ ResourceParams name=jdbc/myWebApp parameter nameurl/name valuejdbc:mysql://NAME_OR_IP_OF_MYSQL_SERVER:3306/NAME_OF_DATABASE?au toRe c onnect=true/value /parameter parameter namemaxIdle/name value15/value /parameter parameter namemaxActive/name value50/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter namemaxWait
Tomcat - MySQL = No suitable driver ERROR
I'm trying to setup Tomcat 5.0.25 to talk to a MySQL database and I've had no luck after several days of fighting with this thing. I'm following along the documentation at this URI: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how to.html The example says to edit server.xml Add this in between the /Context tag of the examples context and the /Host tag closing the localhost definition. So far I've not found any Context example in server.xml. So that doesn't appear to exist. However, I have placed it before the /Host tag and have also tried putting it in the GlobalNamingResources as well, but that didn't make any difference for me. I have placed the mysql-connector-java-3.0.14-production-bin.jar file in /tomcat/common/lib as instructed. I have also tried placing it WEB-INF/lib, that didn't work. Also tried putting it in tomcat/server/lib and that didn't help either. I have the impressiont that the datasource-examples-howto is somehow out of date, hasn't been really tested much, or is just plain incorrect because I've found numerous other hits on GOOGLE.COM about this problem, but nobody really has much of a solution. Seems to me that setting this up shouldn't be this complicated. The error message I keep getting all the time is: javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) Root Cause: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk nown Source) org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow n Source) org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100) org.apache.jsp.test_jsp._jspService(test_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) server.xml: !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Comment these entries out to disable JMX MBeans support -- !-- You may also configure custom components (e.g. Valves/Realms) by including your own mbean-descriptor file(s), and setting the descriptors attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list. e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
RE: Tomcat - MySQL = No suitable driver ERROR
here maybee it could help you! im using mysql database whit Tomcat4.0 and the config look like this! first download mysql-connector-java-3.0.10-stable-bin read install instruction (or simply copy the file under Tomcat_home/comon/lib) the conection acess to database ! xml DRIVERcom.mysql.jdbc.Driver/DRIVER URLjdbc:mysql://localhost:port/database name/URL LOGINroot/LOGIN PASSWORD/PASSWORD the pasword is not neded if you use localhost hope it help you friendly frank [EMAIL PROTECTED] administrateur http://entre-nous.qc.tc From: Briggs, Patrick [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Tomcat - MySQL = No suitable driver ERROR Date: Tue, 29 Jun 2004 15:00:59 -0700 I'm trying to setup Tomcat 5.0.25 to talk to a MySQL database and I've had no luck after several days of fighting with this thing. I'm following along the documentation at this URI: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how to.html The example says to edit server.xml Add this in between the /Context tag of the examples context and the /Host tag closing the localhost definition. So far I've not found any Context example in server.xml. So that doesn't appear to exist. However, I have placed it before the /Host tag and have also tried putting it in the GlobalNamingResources as well, but that didn't make any difference for me. I have placed the mysql-connector-java-3.0.14-production-bin.jar file in /tomcat/common/lib as instructed. I have also tried placing it WEB-INF/lib, that didn't work. Also tried putting it in tomcat/server/lib and that didn't help either. I have the impressiont that the datasource-examples-howto is somehow out of date, hasn't been really tested much, or is just plain incorrect because I've found numerous other hits on GOOGLE.COM about this problem, but nobody really has much of a solution. Seems to me that setting this up shouldn't be this complicated. The error message I keep getting all the time is: javax.servlet.ServletException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI mpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:758) org.apache.jsp.test_jsp._jspService(test_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) Root Cause: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unk nown Source) org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknow n Source) org.apache.jsp.test_jsp._jspx_meth_sql_query_0(test_jsp.java:100) org.apache.jsp.test_jsp._jspService(test_jsp.java:58) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 98) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) server.xml: !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN debug=0 !-- Comment these entries out to disable JMX MBeans support -- !-- You may also configure custom components (e.g. Valves/Realms) by including your own mbean-descriptor file(s), and setting the descriptors attribute to point to a ';' seperated list of paths (in the ClassLoader sense) of files to add to the default list. e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml -- Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className
connexion tomcat/mysql: IP vs localhost
Hi all, I've a problem while connecting to mysql from tomcat. There is a bean which initializes the connexion between tomcat and mysql. The parameter which seems to be faulty is the url: jdbc:mysql://localhost:3306/appli After a reboot, this url caused an error, ie the connexion between mysql and tomcat was not up. The url had to be replaced by the following: jdbc:mysql://212.xxx.xxx.xxx:3306/appli, ie I had to put the IP address instead of localhost, without understanding why, whearas no modification relating to this had occured. All was going well until another reboot, after which I had to put the old line back, with localhost, always without understanding why. The searches on google, mysql and tomcat sites didn't bring me a solution. Here is the configuration of my box: redaht 7.2 mysql 3.23 tomcat4 4.1.10 j2sdk 1.4.0 Could anyone explain me why sometimes the IP address should be put, and sometimes localhost? I'd like to make it work at any time. Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: connexion tomcat/mysql: IP vs localhost
Are you sure it's not MySQL being funny? Try going in to mysql as root and executing this query: select user, host from mysql.user ; Take a look at the host field for the user tomcat is logging in as. If it specifies anything other than %, you may end up having to put in a row for every identity your computer can be. I've had that trouble myself. I want it restricted so only the tomcat server is getting in as the webapp user. Anyone else would be rejected even if they did manage to get the username and password. To do that, I had to cover my bases and put in a row for each: localhost, 127.0.0.1, the IP address, and the FQDN of the machine tomcat was on. --David Guillaume Roger wrote: Hi all, I've a problem while connecting to mysql from tomcat. There is a bean which initializes the connexion between tomcat and mysql. The parameter which seems to be faulty is the url: jdbc:mysql://localhost:3306/appli After a reboot, this url caused an error, ie the connexion between mysql and tomcat was not up. The url had to be replaced by the following: jdbc:mysql://212.xxx.xxx.xxx:3306/appli, ie I had to put the IP address instead of localhost, without understanding why, whearas no modification relating to this had occured. All was going well until another reboot, after which I had to put the old line back, with localhost, always without understanding why. The searches on google, mysql and tomcat sites didn't bring me a solution. Here is the configuration of my box: redaht 7.2 mysql 3.23 tomcat4 4.1.10 j2sdk 1.4.0 Could anyone explain me why sometimes the IP address should be put, and sometimes localhost? I'd like to make it work at any time. Thanks, - 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]
Re: connexion tomcat/mysql: IP vs localhost
David Smith a écrit : Are you sure it's not MySQL being funny? Try going in to mysql as root and executing this query: select user, host from mysql.user ; That was an idea I already had, and I checked that. It is specified %, so I should be able to connect from everywhere. The thing is that I connect always from the same box (tomcat and mysql are on the same box), but I have to specify in my jsp sometimes localhost, and sometimes the IP address to connect. I suspected alternatively mysql, the network configuration, tomcat... I must admit that I'm a bit lost. Thanks for your help - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: connexion tomcat/mysql: IP vs localhost
Well, then I'm not sure what to tell you. I use mysql all the time and have never had such an issue (Mandrake Linux 9.2, Tomcat 5.0.19, Apache 2.0). Very strange. Are there any firewalls or internet connection sharing programs at work? --David Guillaume Roger wrote: David Smith a écrit : Are you sure it's not MySQL being funny? Try going in to mysql as root and executing this query: select user, host from mysql.user ; That was an idea I already had, and I checked that. It is specified %, so I should be able to connect from everywhere. The thing is that I connect always from the same box (tomcat and mysql are on the same box), but I have to specify in my jsp sometimes localhost, and sometimes the IP address to connect. I suspected alternatively mysql, the network configuration, tomcat... I must admit that I'm a bit lost. Thanks for your help - 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]
Re: connexion tomcat/mysql: IP vs localhost
How do I unsubscribe from this mail group, as I keep getting mails every to minutes?
Re: connexion tomcat/mysql: IP vs localhost
try here http://jakarta.apache.org/site/mail2.html#Tomcat - Original Message - From: [EMAIL PROTECTED] Date: Tuesday, March 30, 2004 0:41 am Subject: Re: connexion tomcat/mysql: IP vs localhost How do I unsubscribe from this mail group, as I keep getting mails every to minutes? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: connexion tomcat/mysql: IP vs localhost
== Date: Mon, 29 Mar 2004 11:03:11 +0200 jdbc:mysql://localhost:3306/appli jdbc:mysql://212.xxx.xxx.xxx:3306/appli quite strange... what happens if you put 127.0.0.1 (i.e. the IP address for localhost)? I think that, because you are working on a box (i.e. client and server on the same PC) this behaviour is related to your net configuration... check your hosts file. G -- Giuseppe Briotti [EMAIL PROTECTED] Alme Sol, curru nitido diem qui promis et celas aliusque et idem nasceris, possis nihil urbe Roma visere maius. (Orazio) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat mysql not working
Thanks a lot On Sun, 21 Dec 2003 10:15:56 -0500 Doug Parsons [EMAIL PROTECTED] wrote: Leandro, If you downloaded the latest jar for mysql you will need to use: String driver = com.mysql.jdbc.Driver; When mySQL took on the driver as the official version the name was changed. Doug PS: If response time is an issue, then you will want to read up on this: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html I run TC4, so I'm not sure if TC5 is the same. It will give you some of the reasons for pooling. But for development you can get by on connecting each time. Note: This may show up as a double or triple post. I sent the same message over 12 hours ago and it never showed up on the list. Leandro, I cc you in the hopes that you get this sooner incase my mail is being delayed by the list. - Original Message - From: Leandro Costa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 1:07 PM Subject: Re: tomcat mysql not working Thanks for your answer, but i'm not the one that's developing the site.. it's a webpage that's hosted in our servers and i don't think that it'd be the right thing to tinker with those files.. The thing that i can't understand is why, in another machine, that is running tomcat4 (not installed by me), and j2sdk 1.3 runs ok.. I'm running tomcat5 and j2sdk 1.4 Does anyone have any idea ? On Sat, 20 Dec 2003 08:07:57 -0800 (PST) Al Likha [EMAIL PROTECTED] wrote: There is some source code template from likha devcentre. Download from likhasoftware.com Al - Original Message - From: Leandro Costa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 6:57 AM Subject: tomcat mysql not working Hi there, i'm trying to get a tomcat server running with mysql connectivity. Tomcat is running ok, and i've downloaded the new Connector/J, and copied the .jar file to $CATALINA_HOME/common/lib. I'm running Tomcat 5.0.16. The other JSPs work ok, but the ones that contain a connection to mysql, fail with this message: snip HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 58) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.NullPointerException org.apache.jsp.jspCounter_jsp._jspService(jspCounter_jsp.java:83) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 11) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. Apache Tomcat/5.0.16 /snip I don't know anything about Java, but i think that the 'NullPointerException' is because it can't get a handler to communicate with MySQL. The JSP file connects to MySQL like this: snip String host = localhost; String dbName = MYDBNAME; String driver = org.gjt.mm.mysql.Driver; String username = MYUSERNAME; String password = MYPASSWORD; String url = jdbc:mysql:// + host + :3306/ + dbName; String table = counter; Connection connection = null; Statement statement = null; Statement statement2 = null; ResultSet resultSet = null; ResultSetMetaData resultsMetaData = null; String query = ; try{ Class.forName(driver) ; connection = DriverManager.getConnection(url, username, password); statement = connection.createStatement(); /snip I've seen in some example configuration files that you can specify a DB, username, password, etc. But i don't know if i have to do it, because this JSP specifies all that.. If someone could give me a helping hand, I would be more than grateful. Regards, Leandro Costa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? New Yahoo! Photos - easier
tomcat mysql not working
Hi there, i'm trying to get a tomcat server running with mysql connectivity. Tomcat is running ok, and i've downloaded the new Connector/J, and copied the .jar file to $CATALINA_HOME/common/lib. I'm running Tomcat 5.0.16. The other JSPs work ok, but the ones that contain a connection to mysql, fail with this message: snip HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.NullPointerException org.apache.jsp.jspCounter_jsp._jspService(jspCounter_jsp.java:83) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. Apache Tomcat/5.0.16 /snip I don't know anything about Java, but i think that the 'NullPointerException' is because it can't get a handler to communicate with MySQL. The JSP file connects to MySQL like this: snip String host = localhost; String dbName = MYDBNAME; String driver = org.gjt.mm.mysql.Driver; String username = MYUSERNAME; String password = MYPASSWORD; String url = jdbc:mysql:// + host + :3306/ + dbName; String table = counter; Connection connection = null; Statement statement = null; Statement statement2 = null; ResultSet resultSet = null; ResultSetMetaData resultsMetaData = null; String query = ; try{ Class.forName(driver) ; connection = DriverManager.getConnection(url, username, password); statement = connection.createStatement(); /snip I've seen in some example configuration files that you can specify a DB, username, password, etc. But i don't know if i have to do it, because this JSP specifies all that.. If someone could give me a helping hand, I would be more than grateful. Regards, Leandro Costa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat mysql not working
Thanks for your answer, but i'm not the one that's developing the site.. it's a webpage that's hosted in our servers and i don't think that it'd be the right thing to tinker with those files.. The thing that i can't understand is why, in another machine, that is running tomcat4 (not installed by me), and j2sdk 1.3 runs ok.. I'm running tomcat5 and j2sdk 1.4 Does anyone have any idea ? On Sat, 20 Dec 2003 08:07:57 -0800 (PST) Al Likha [EMAIL PROTECTED] wrote: There is some source code template from likha devcentre. Download from likhasoftware.com Al - Original Message - From: Leandro Costa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 20, 2003 6:57 AM Subject: tomcat mysql not working Hi there, i'm trying to get a tomcat server running with mysql connectivity. Tomcat is running ok, and i've downloaded the new Connector/J, and copied the .jar file to $CATALINA_HOME/common/lib. I'm running Tomcat 5.0.16. The other JSPs work ok, but the ones that contain a connection to mysql, fail with this message: snip HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) root cause java.lang.NullPointerException org.apache.jsp.jspCounter_jsp._jspService(jspCounter_jsp.java:83) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) note The full stack trace of the root cause is available in the Tomcat logs. Apache Tomcat/5.0.16 /snip I don't know anything about Java, but i think that the 'NullPointerException' is because it can't get a handler to communicate with MySQL. The JSP file connects to MySQL like this: snip String host = localhost; String dbName = MYDBNAME; String driver = org.gjt.mm.mysql.Driver; String username = MYUSERNAME; String password = MYPASSWORD; String url = jdbc:mysql:// + host + :3306/ + dbName; String table = counter; Connection connection = null; Statement statement = null; Statement statement2 = null; ResultSet resultSet = null; ResultSetMetaData resultsMetaData = null; String query = ; try{ Class.forName(driver) ; connection = DriverManager.getConnection(url, username, password); statement = connection.createStatement(); /snip I've seen in some example configuration files that you can specify a DB, username, password, etc. But i don't know if i have to do it, because this JSP specifies all that.. If someone could give me a helping hand, I would be more than grateful. Regards, Leandro Costa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Still waiting for some confirmation from Remy Maucherat. He was talking about the client deployer package, however I cannot find it... Neither can I.. Thanks -Original Message- From: Ilja Hehenkamp [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 16:07 To: [EMAIL PROTECTED] Subject: Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null' It could be related, but I'm not sure. I think the problem lies in the way the application gets deployed with this ant build file. Probably the docbase doesn't match (however that's just a wild guess) Still waiting for some confirmation from Remy Maucherat. He was talking about the client deployer package, however I cannot find it... Ilja _ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl - 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]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Remy Maucherat, can you elobarate on this deployer client? You talked about it, but it can nowhere be found. I'm still very stuck on this matter and don't have a way of fixing it... Deploying is a pain in the ass now compared to the convenient way of building with ant... From: Ilja Hehenkamp [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null' Date: Fri, 19 Sep 2003 19:37:46 +0200 Sorry, I don't really understand what you mean? Do you mean I shouldn't use the build file anymore? If so: that's too bad, since I like the way of automated updating the tomcat manager... I'm sure you do. You seem to be stuck on that particular page of the docs, however, which happens to be out of date, and doesn't actually mention what is important. Read the deployer page instead (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html ). But still: I don't know how to fix the problem: why doesn't the jndi datasource work with the through ant deployed application? Because I don't think your stuff in server.xml is used at all. That's much better. I recommend you use the deployer package instead. The instructions from appdev are going to be updated or removed. I think I know where lies the problem, however I still don't know how to fix it... I use the sample build.xml file from Tomcat: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/ build.xml.txt to install, reload and distribute my sample application. When I do an ant -install it apparantly installs the application in the Tomcat manager, however the application doesn't show up in the webapps directory. That's 1. So maybe there's a conflict with either the context path, which I don't think so, since my build file has explicitly set the context path to /DBTest: property name=app.name value=DBTest/ property name=app.path value=/${app.name}/ property name=app.version value=/ property name=build.homevalue=${basedir}/build/ property name=catalina.home value=/Library/Tomcat/ !-- UPDATE THIS! -- property name=dist.home value=${basedir}/dist/ property name=docs.home value=${basedir}/docs/ property name=manager.url value= http://localhost:8080/manager / property name=src.home value=${basedir}/src/ property name=web.home value=${basedir}/web/ Or there's a conflict with the docbase, which I suspect... However I'm not sure why and how to fix it Because when I put the generated war file (when doing an ant -dist) in the webapps directory the connection works! Although this works, it's not very convenient, since it defeats the purpose of the automated installing through ant... Hope I made myself clear? Ok, first some configuration information: Tomcat 5.09 MySQL Driver 3.08 stable OS: Mac OSX 10.2.6 J2SE 1.4.2 all commons libraries reside in $CATALINA_HOME/common/lib MySQL Driver resides in $CATALINA_HOME/common/lib as well I tried setting up a simple JNDI datasource connection but get the following error message: java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataS ource .java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSour ce.ja va:312) at foo.DBTest.init(DBTest.java:24) at foo.TestServlet.doGet(TestServlet.java:34) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) The code and examples are taken from http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource- examples-howto.html I have searched through tons of archives and websites and mostly this error could be resolved by placing the driver and commons in the common/lib directory. However in my case they are there, so I cannot figure out what's the problem... server.xml: Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_DBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter parameter nameusername/name valuexxx/value /parameter parameter namepassword/name valuexxx/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/javatest?autoReconnect=true/ value /parameter /ResourceParams /Context web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd web-app descriptionMySQL Test App/description
Apache/Tomcat/MySQL Startup Sequence on Linux
Hi, I'm having problems coordinating the startup scripts for Apache, Tomcat (connected via mod_webapp) and MySQL. The situation seems to be this: - mod_webapp requires Tomcat to be already running when httpd starts - the Tomcat application contains a connection pool that requires MySQL to be running when Tomcat starts (this is a crap architecture, but I havn't time to change it) I can execute the startup scripts manually in the sequence MySQL/Tomcat/Apache, and everything is fine. But when they are executed at system boot it doesn't work. The httpd log contains a web application not found message, and pages from the application are not available. I've renamed the startup scripts so that the sequence is correct, but it still doesn't work. My guess is that most of the Tomcat startup forks, so that the httpd startup is invoked before it has completed. I can think of two very klugey workarounds: - call httpd restart at the end of the Tomcat startup - what will this do if the real httpd script is still executing? - make the httpd script sleep for a while before it does anything - but there's no way to guarantee it will sleep long enough Alternatively I could add code to the httpd script to see if Tomcat has completed its startup. But I don't know for sure how I would tell, and I'd rather avoid this sort of hack if there's a proper way to do it. Chris Walker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Ok, first some configuration information: Tomcat 5.09 MySQL Driver 3.08 stable OS: Mac OSX 10.2.6 J2SE 1.4.2 all commons libraries reside in $CATALINA_HOME/common/lib MySQL Driver resides in $CATALINA_HOME/common/lib as well I tried setting up a simple JNDI datasource connection but get the following error message: java.sql.SQLException: Cannot load JDBC driver class 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:312) at foo.DBTest.init(DBTest.java:24) at foo.TestServlet.doGet(TestServlet.java:34) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) The code and examples are taken from http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource- examples-howto.html I have searched through tons of archives and websites and mostly this error could be resolved by placing the driver and commons in the common/lib directory. However in my case they are there, so I cannot figure out what's the problem... server.xml: Context path=/DBTest docBase=DBTest debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_DBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/TestDB parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter parameter nameusername/name valuexxx/value /parameter parameter namepassword/name valuexxx/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/javatest?autoReconnect=true/value /parameter /ResourceParams /Context web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app descriptionMySQL Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref servlet servlet-nameDBTestServlet/servlet-name description Bla... /description servlet-classfoo.TestServlet/servlet-class /servlet servlet-mapping servlet-nameDBTestServlet/servlet-name url-pattern/DBTestServlet/url-pattern /servlet-mapping /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache/Tomcat/MySQL Startup Sequence on Linux
Don't use mod_webapp. Use jk or jk2. Webapp is unsupported. jk, jk2 allow for either side to go down and all is still ok when it comes back up -Tim Walker Chris wrote: Hi, I'm having problems coordinating the startup scripts for Apache, Tomcat (connected via mod_webapp) and MySQL. The situation seems to be this: - mod_webapp requires Tomcat to be already running when httpd starts - the Tomcat application contains a connection pool that requires MySQL to be running when Tomcat starts (this is a crap architecture, but I havn't time to change it) I can execute the startup scripts manually in the sequence MySQL/Tomcat/Apache, and everything is fine. But when they are executed at system boot it doesn't work. The httpd log contains a web application not found message, and pages from the application are not available. I've renamed the startup scripts so that the sequence is correct, but it still doesn't work. My guess is that most of the Tomcat startup forks, so that the httpd startup is invoked before it has completed. I can think of two very klugey workarounds: - call httpd restart at the end of the Tomcat startup - what will this do if the real httpd script is still executing? - make the httpd script sleep for a while before it does anything - but there's no way to guarantee it will sleep long enough Alternatively I could add code to the httpd script to see if Tomcat has completed its startup. But I don't know for sure how I would tell, and I'd rather avoid this sort of hack if there's a proper way to do it. Chris Walker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache/Tomcat/MySQL Startup Sequence on Linux
Aaargh! I worked to 3am for several days to get webapp set up. I shouldn't believe what I read in books. What's the difference between jk and jk2? And why is webapp unsupported? Chris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 11:46 To: Tomcat Users List Subject: Re: Apache/Tomcat/MySQL Startup Sequence on Linux Don't use mod_webapp. Use jk or jk2. Webapp is unsupported. jk, jk2 allow for either side to go down and all is still ok when it comes back up -Tim Walker Chris wrote: Hi, I'm having problems coordinating the startup scripts for Apache, Tomcat (connected via mod_webapp) and MySQL. The situation seems to be this: - mod_webapp requires Tomcat to be already running when httpd starts - the Tomcat application contains a connection pool that requires MySQL to be running when Tomcat starts (this is a crap architecture, but I havn't time to change it) I can execute the startup scripts manually in the sequence MySQL/Tomcat/Apache, and everything is fine. But when they are executed at system boot it doesn't work. The httpd log contains a web application not found message, and pages from the application are not available. I've renamed the startup scripts so that the sequence is correct, but it still doesn't work. My guess is that most of the Tomcat startup forks, so that the httpd startup is invoked before it has completed. I can think of two very klugey workarounds: - call httpd restart at the end of the Tomcat startup - what will this do if the real httpd script is still executing? - make the httpd script sleep for a while before it does anything - but there's no way to guarantee it will sleep long enough Alternatively I could add code to the httpd script to see if Tomcat has completed its startup. But I don't know for sure how I would tell, and I'd rather avoid this sort of hack if there's a proper way to do it. Chris Walker - 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]
Re: Apache/Tomcat/MySQL Startup Sequence on Linux
FAQ. http://jakarta.apache.org/tomcat/faq/connectors.html -Tim Walker Chris wrote: Aaargh! I worked to 3am for several days to get webapp set up. I shouldn't believe what I read in books. What's the difference between jk and jk2? And why is webapp unsupported? Chris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 11:46 To: Tomcat Users List Subject: Re: Apache/Tomcat/MySQL Startup Sequence on Linux Don't use mod_webapp. Use jk or jk2. Webapp is unsupported. jk, jk2 allow for either side to go down and all is still ok when it comes back up -Tim Walker Chris wrote: Hi, I'm having problems coordinating the startup scripts for Apache, Tomcat (connected via mod_webapp) and MySQL. The situation seems to be this: - mod_webapp requires Tomcat to be already running when httpd starts - the Tomcat application contains a connection pool that requires MySQL to be running when Tomcat starts (this is a crap architecture, but I havn't time to change it) I can execute the startup scripts manually in the sequence MySQL/Tomcat/Apache, and everything is fine. But when they are executed at system boot it doesn't work. The httpd log contains a web application not found message, and pages from the application are not available. I've renamed the startup scripts so that the sequence is correct, but it still doesn't work. My guess is that most of the Tomcat startup forks, so that the httpd startup is invoked before it has completed. I can think of two very klugey workarounds: - call httpd restart at the end of the Tomcat startup - what will this do if the real httpd script is still executing? - make the httpd script sleep for a while before it does anything - but there's no way to guarantee it will sleep long enough Alternatively I could add code to the httpd script to see if Tomcat has completed its startup. But I don't know for sure how I would tell, and I'd rather avoid this sort of hack if there's a proper way to do it. Chris Walker - 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]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Ilja wrote: Ok, first some configuration information: Tomcat 5.09 MySQL Driver 3.08 stable OS: Mac OSX 10.2.6 J2SE 1.4.2 My config is not the same (TC 4.1.24, OSX 10.2.6, MySQL 3.07), and my parameters are different: ResourceParams name=jdbc/EuratomDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name value100/value /parameter parameter nameusername/name valuexxx/value /parameter parameter namepassword/name valuexxx/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/euratom?autoReconnect=true/value /parameter /ResourceParams This works for me! The main diffs are (i) I specify the factory, and (ii), the driverClassName is com.mysql.jdbc.Driver However, the exception seems to suggest that the correct factory is being used by default. Your driverClassName is the old name, and might not be in the jar file any more. HTH Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache/Tomcat/MySQL Startup Sequence on Linux
Chris, Webapp is unsupported because JK is better and noone in the open source community wants to support it. Are you volunteering ;-) Andy -Original Message- From: Walker Chris [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 11:58 To: 'Tomcat Users List' Subject: RE: Apache/Tomcat/MySQL Startup Sequence on Linux Aaargh! I worked to 3am for several days to get webapp set up. I shouldn't believe what I read in books. What's the difference between jk and jk2? And why is webapp unsupported? Chris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 11:46 To: Tomcat Users List Subject: Re: Apache/Tomcat/MySQL Startup Sequence on Linux Don't use mod_webapp. Use jk or jk2. Webapp is unsupported. jk, jk2 allow for either side to go down and all is still ok when it comes back up -Tim Walker Chris wrote: Hi, I'm having problems coordinating the startup scripts for Apache, Tomcat (connected via mod_webapp) and MySQL. The situation seems to be this: - mod_webapp requires Tomcat to be already running when httpd starts - the Tomcat application contains a connection pool that requires MySQL to be running when Tomcat starts (this is a crap architecture, but I havn't time to change it) I can execute the startup scripts manually in the sequence MySQL/Tomcat/Apache, and everything is fine. But when they are executed at system boot it doesn't work. The httpd log contains a web application not found message, and pages from the application are not available. I've renamed the startup scripts so that the sequence is correct, but it still doesn't work. My guess is that most of the Tomcat startup forks, so that the httpd startup is invoked before it has completed. I can think of two very klugey workarounds: - call httpd restart at the end of the Tomcat startup - what will this do if the real httpd script is still executing? - make the httpd script sleep for a while before it does anything - but there's no way to guarantee it will sleep long enough Alternatively I could add code to the httpd script to see if Tomcat has completed its startup. But I don't know for sure how I would tell, and I'd rather avoid this sort of hack if there's a proper way to do it. Chris Walker - 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]
RE: Apache/Tomcat/MySQL Startup Sequence on Linux
Andy, I wish. The expression I worked to 3am may give you some idea of how much spare time I have, especially now that I've got to reconfigure the production server without anyone noticing... Chris -Original Message- From: Andy Eastham [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 13:37 To: Tomcat Users List Subject: RE: Apache/Tomcat/MySQL Startup Sequence on Linux Chris, Webapp is unsupported because JK is better and noone in the open source community wants to support it. Are you volunteering ;-) Andy -Original Message- From: Walker Chris [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 11:58 To: 'Tomcat Users List' Subject: RE: Apache/Tomcat/MySQL Startup Sequence on Linux Aaargh! I worked to 3am for several days to get webapp set up. I shouldn't believe what I read in books. What's the difference between jk and jk2? And why is webapp unsupported? Chris -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 11:46 To: Tomcat Users List Subject: Re: Apache/Tomcat/MySQL Startup Sequence on Linux Don't use mod_webapp. Use jk or jk2. Webapp is unsupported. jk, jk2 allow for either side to go down and all is still ok when it comes back up -Tim Walker Chris wrote: Hi, I'm having problems coordinating the startup scripts for Apache, Tomcat (connected via mod_webapp) and MySQL. The situation seems to be this: - mod_webapp requires Tomcat to be already running when httpd starts - the Tomcat application contains a connection pool that requires MySQL to be running when Tomcat starts (this is a crap architecture, but I havn't time to change it) I can execute the startup scripts manually in the sequence MySQL/Tomcat/Apache, and everything is fine. But when they are executed at system boot it doesn't work. The httpd log contains a web application not found message, and pages from the application are not available. I've renamed the startup scripts so that the sequence is correct, but it still doesn't work. My guess is that most of the Tomcat startup forks, so that the httpd startup is invoked before it has completed. I can think of two very klugey workarounds: - call httpd restart at the end of the Tomcat startup - what will this do if the real httpd script is still executing? - make the httpd script sleep for a while before it does anything - but there's no way to guarantee it will sleep long enough Alternatively I could add code to the httpd script to see if Tomcat has completed its startup. But I don't know for sure how I would tell, and I'd rather avoid this sort of hack if there's a proper way to do it. Chris Walker - 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]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
I think I know where lies the problem, however I still don't know how to fix it... I use the sample build.xml file from Tomcat: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt to install, reload and distribute my sample application. When I do an ant -install it apparantly installs the application in the Tomcat manager, however the application doesn't show up in the webapps directory. That's 1. So maybe there's a conflict with either the context path, which I don't think so, since my build file has explicitly set the context path to /DBTest: property name=app.name value=DBTest/ property name=app.path value=/${app.name}/ property name=app.version value=/ property name=build.homevalue=${basedir}/build/ property name=catalina.home value=/Library/Tomcat/ !-- UPDATE THIS! -- property name=dist.home value=${basedir}/dist/ property name=docs.home value=${basedir}/docs/ property name=manager.url value=http://localhost:8080/manager/ property name=src.home value=${basedir}/src/ property name=web.home value=${basedir}/web/ Or there's a conflict with the docbase, which I suspect... However I'm not sure why and how to fix it Because when I put the generated war file (when doing an ant -dist) in the webapps directory the connection works! Although this works, it's not very convenient, since it defeats the purpose of the automated installing through ant... Hope I made myself clear? From: Martin Jacobson [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null' Date: Mon, 15 Sep 2003 14:00:52 +0200 Ilja wrote: Ok, first some configuration information: Tomcat 5.09 MySQL Driver 3.08 stable OS: Mac OSX 10.2.6 J2SE 1.4.2 My config is not the same (TC 4.1.24, OSX 10.2.6, MySQL 3.07), and my parameters are different: ResourceParams name=jdbc/EuratomDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name value100/value /parameter parameter nameusername/name valuexxx/value /parameter parameter namepassword/name valuexxx/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/euratom?autoReconnect=true/value /parameter /ResourceParams This works for me! The main diffs are (i) I specify the factory, and (ii), the driverClassName is com.mysql.jdbc.Driver However, the exception seems to suggest that the correct factory is being used by default. Your driverClassName is the old name, and might not be in the jar file any more. HTH Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Ilja Hehenkamp wrote: I think I know where lies the problem, however I still don't know how to fix it... I use the sample build.xml file from Tomcat: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt to install, reload and distribute my sample application. When I do an ant -install it apparantly installs the application in the Tomcat manager, however the application doesn't show up in the webapps directory. That's 1. So maybe there's a conflict with either the context path, which I don't think so, since my build file has explicitly set the context path to /DBTest: property name=app.name value=DBTest/ property name=app.path value=/${app.name}/ property name=app.version value=/ property name=build.homevalue=${basedir}/build/ property name=catalina.home value=/Library/Tomcat/ !-- UPDATE THIS! -- property name=dist.home value=${basedir}/dist/ property name=docs.home value=${basedir}/docs/ property name=manager.url value=http://localhost:8080/manager/ property name=src.home value=${basedir}/src/ property name=web.home value=${basedir}/web/ Or there's a conflict with the docbase, which I suspect... However I'm not sure why and how to fix it Because when I put the generated war file (when doing an ant -dist) in the webapps directory the connection works! Although this works, it's not very convenient, since it defeats the purpose of the automated installing through ant... Hope I made myself clear? That's much better. I recommend you use the deployer package instead. The instructions from appdev are going to be updated or removed. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Sorry, I don't really understand what you mean? Do you mean I shouldn't use the build file anymore? If so: that's too bad, since I like the way of automated updating the tomcat manager... But still: I don't know how to fix the problem: why doesn't the jndi datasource work with the through ant deployed application? From: Remy Maucherat [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null' Date: Mon, 15 Sep 2003 15:17:53 +0200 Ilja Hehenkamp wrote: I think I know where lies the problem, however I still don't know how to fix it... I use the sample build.xml file from Tomcat: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt to install, reload and distribute my sample application. When I do an ant -install it apparantly installs the application in the Tomcat manager, however the application doesn't show up in the webapps directory. That's 1. So maybe there's a conflict with either the context path, which I don't think so, since my build file has explicitly set the context path to /DBTest: property name=app.name value=DBTest/ property name=app.path value=/${app.name}/ property name=app.version value=/ property name=build.homevalue=${basedir}/build/ property name=catalina.home value=/Library/Tomcat/ !-- UPDATE THIS! -- property name=dist.home value=${basedir}/dist/ property name=docs.home value=${basedir}/docs/ property name=manager.url value=http://localhost:8080/manager/ property name=src.home value=${basedir}/src/ property name=web.home value=${basedir}/web/ Or there's a conflict with the docbase, which I suspect... However I'm not sure why and how to fix it Because when I put the generated war file (when doing an ant -dist) in the webapps directory the connection works! Although this works, it's not very convenient, since it defeats the purpose of the automated installing through ant... Hope I made myself clear? That's much better. I recommend you use the deployer package instead. The instructions from appdev are going to be updated or removed. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Ilja Hehenkamp wrote: Sorry, I don't really understand what you mean? Do you mean I shouldn't use the build file anymore? If so: that's too bad, since I like the way of automated updating the tomcat manager... I'm sure you do. You seem to be stuck on that particular page of the docs, however, which happens to be out of date, and doesn't actually mention what is important. Read the deployer page instead (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html). But still: I don't know how to fix the problem: why doesn't the jndi datasource work with the through ant deployed application? Because I don't think your stuff in server.xml is used at all. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
Sorry for being such a pain in the ass, but It's still not really clear to me: What do you actually suggest? Are you talking about this client deployer that's listed on that page? Where can I find it? (I cannot find it, neither the build file that's mentioned there) Will this fix my problem? So for confirmation: I shouldn't use the old ant buildfile anymore? Ilja From: Remy Maucherat [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null' Date: Mon, 15 Sep 2003 15:33:13 +0200 Ilja Hehenkamp wrote: Sorry, I don't really understand what you mean? Do you mean I shouldn't use the build file anymore? If so: that's too bad, since I like the way of automated updating the tomcat manager... I'm sure you do. You seem to be stuck on that particular page of the docs, however, which happens to be out of date, and doesn't actually mention what is important. Read the deployer page instead (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howto.html). But still: I don't know how to fix the problem: why doesn't the jndi datasource work with the through ant deployed application? Because I don't think your stuff in server.xml is used at all. -- x Rémy Maucherat Senior Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
it is possible that the problem stems from Tomcat itself. The reason i say that, is because i have setup a dbcp connection (using Tomcat 4.1, jdk 1.4, oracle on win2k), and i have managed to get it to work with a particular application, but get the same Cannot load JDBC driver class 'null' when try to use connection with ROOT application, or with any other application. It is weird, and i have not figured out what problem is. Also, there are many previous emails in this user-group pertaining to this Cannot-load-JDBC error, esp. when associated with use as a global resource. -paul lomack p.s. i would be happy to report my server.xml or web.xml or jsp code for calling connection, if you think it may be of any use to you. - Original Message - From: Ilja Hehenkamp [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 15, 2003 9:10 AM Subject: Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null' I think I know where lies the problem, however I still don't know how to fix it... I use the sample build.xml file from Tomcat: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt to install, reload and distribute my sample application. When I do an ant -install it apparantly installs the application in the Tomcat manager, however the application doesn't show up in the webapps directory. That's 1. So maybe there's a conflict with either the context path, which I don't think so, since my build file has explicitly set the context path to /DBTest: property name=app.name value=DBTest/ property name=app.path value=/${app.name}/ property name=app.version value=/ property name=build.homevalue=${basedir}/build/ property name=catalina.home value=/Library/Tomcat/ !-- UPDATE THIS! -- property name=dist.home value=${basedir}/dist/ property name=docs.home value=${basedir}/docs/ property name=manager.url value=http://localhost:8080/manager/ property name=src.home value=${basedir}/src/ property name=web.home value=${basedir}/web/ Or there's a conflict with the docbase, which I suspect... However I'm not sure why and how to fix it Because when I put the generated war file (when doing an ant -dist) in the webapps directory the connection works! Although this works, it's not very convenient, since it defeats the purpose of the automated installing through ant... Hope I made myself clear? From: Martin Jacobson [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null' Date: Mon, 15 Sep 2003 14:00:52 +0200 Ilja wrote: Ok, first some configuration information: Tomcat 5.09 MySQL Driver 3.08 stable OS: Mac OSX 10.2.6 J2SE 1.4.2 My config is not the same (TC 4.1.24, OSX 10.2.6, MySQL 3.07), and my parameters are different: ResourceParams name=jdbc/EuratomDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value3/value /parameter parameter namemaxWait/name value100/value /parameter parameter nameusername/name valuexxx/value /parameter parameter namepassword/name valuexxx/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/euratom?autoReconnect=true/value /parameter /ResourceParams This works for me! The main diffs are (i) I specify the factory, and (ii), the driverClassName is com.mysql.jdbc.Driver However, the exception seems to suggest that the correct factory is being used by default. Your driverClassName is the old name, and might not be in the jar file any more. HTH Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl - 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]
Re: Tomcat, MySQL JNDI: java.sql.SQLException: Cannot load JDBC driver class 'null'
It could be related, but I'm not sure. I think the problem lies in the way the application gets deployed with this ant build file. Probably the docbase doesn't match (however that's just a wild guess) Still waiting for some confirmation from Remy Maucherat. He was talking about the client deployer package, however I cannot find it... Ilja _ MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache/Tomcat/MySQL Startup Sequence on Linux
Umm... you didn't get a response to your initial question about starting things in the right order so perhaps I can help. Sometimes it can be as easy as taking out background commands (ampersand) from the scripts to force them to wait until the app completes its startup. If that doesn't work, and I've seen plenty of cases where it doesn't, I'd write a new script (wrapper) that calls the existing set of startup scripts in proper order and waits for an indication that the application is up and ready. I haven't written such a thing for any of these applications but MySQL, for example, should respond properly to an ODBC connection when it is up. Apache should respond to a GET. Try scripting those in an until loop after calling the regular startup script in your new SuperScript. Another technique is to loop in your wrapper watching either the regular startup script to end (not likely to help with this problem), watching the process list for an indication that startup is complete or watching the messages log. Sendmail, for example, is listed in the process list as accepting connections when it is ready. Apache should have the proper number of child processes idling when it is ready. Your new Superscript should go in the proper spot for booting and the regular scripts should be removed. Hope this helps. Dana Bourgeois -Original Message- From: Walker Chris [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 2:39 AM To: 'Tomcat Users List' Subject: Apache/Tomcat/MySQL Startup Sequence on Linux Hi, I'm having problems coordinating the startup scripts for Apache, Tomcat (connected via mod_webapp) and MySQL. The situation seems to be this: - mod_webapp requires Tomcat to be already running when httpd starts - the Tomcat application contains a connection pool that requires MySQL to be running when Tomcat starts (this is a crap architecture, but I havn't time to change it) I can execute the startup scripts manually in the sequence MySQL/Tomcat/Apache, and everything is fine. But when they are executed at system boot it doesn't work. The httpd log contains a web application not found message, and pages from the application are not available. I've renamed the startup scripts so that the sequence is correct, but it still doesn't work. My guess is that most of the Tomcat startup forks, so that the httpd startup is invoked before it has completed. I can think of two very klugey workarounds: - call httpd restart at the end of the Tomcat startup - what will this do if the real httpd script is still executing? - make the httpd script sleep for a while before it does anything - but there's no way to guarantee it will sleep long enough Alternatively I could add code to the httpd script to see if Tomcat has completed its startup. But I don't know for sure how I would tell, and I'd rather avoid this sort of hack if there's a proper way to do it. Chris Walker - 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]
Re: Connetion between Tomcat MySQL
so what kind of connection is best? using the J/Connector or the OCBC one? --- Bill Barker [EMAIL PROTECTED] wrote: Assuming that you aren't using JDBCRealm, then it should be enough to put the jar file in $TOMCAT_HOME/lib/apps. If you are using JDBCRealm, then place it in $TOMCAT_HOME/lib/common. Setting the CLASSPATH is evil ;-). Amy Cheung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am using Tomcat 3.3.1 and MySQL 4.0 in Window XP. MySQL engine is running. When I run my jsp, it stated the error that import com.mysql.Driver not found. Anyone know how to install the driver properly? I read something about setting the class path. But where to set? I don't know much about the MSDOS command and specify the envirnomental variables in Window XP. I download both the J/Connector OCBC driver from MySQL. Where should be the exact location to store? Thanks, Amy Cheung __ 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] __ 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]
Re: Connetion between Tomcat MySQL
--- Bill Barker [EMAIL PROTECTED] wrote: Assuming that you aren't using JDBCRealm, then it should be enough to put the jar file in $TOMCAT_HOME/lib/apps. If you are using JDBCRealm, then place it in $TOMCAT_HOME/lib/common. Setting the CLASSPATH is evil ;-). Amy Cheung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am using Tomcat 3.3.1 and MySQL 4.0 in Window XP. MySQL engine is running. When I run my jsp, it stated the error that import com.mysql.Driver not found. Anyone know how to install the driver properly? I read something about setting the class path. But where to set? I don't know much about the MSDOS command and specify the envirnomental variables in Window XP. I download both the J/Connector OCBC driver from MySQL. Where should be the exact location to store? Thanks, Amy Cheung __ 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] __ 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]
Re: Connetion between Tomcat MySQL
I'll assume that you're using Connector /J. Stick the file mysql-connector-java-x.y.zz-bin.jar (where x.y.zz is the version number) in Tomcat's common/lib directory. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connetion between Tomcat MySQL
My apologies (and my tping error), the directory should be common/lib, not lib/common. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connetion between Tomcat MySQL
Any JDBC driver for mysql (that works for you) will do. Amy Cheung wrote: so what kind of connection is best? using the J/Connector or the OCBC one? --- Bill Barker [EMAIL PROTECTED] wrote: Assuming that you aren't using JDBCRealm, then it should be enough to put the jar file in $TOMCAT_HOME/lib/apps. If you are using JDBCRealm, then place it in $TOMCAT_HOME/lib/common. Setting the CLASSPATH is evil ;-). Amy Cheung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am using Tomcat 3.3.1 and MySQL 4.0 in Window XP. MySQL engine is running. When I run my jsp, it stated the error that import com.mysql.Driver not found. Anyone know how to install the driver properly? I read something about setting the class path. But where to set? I don't know much about the MSDOS command and specify the envirnomental variables in Window XP. I download both the J/Connector OCBC driver from MySQL. Where should be the exact location to store? Thanks, Amy Cheung __ 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] __ 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]
Re: Connetion between Tomcat MySQL
There is two things you can do. Set your CLASSPATH to include mm.mysql.driver and include the jar in your webapps lib folder. HTH Kind Regards Schalk Volume4
Re: Connetion between Tomcat MySQL
OK. Thanks. It can connects to the database now. Here is a minor problem. The results I obtained from the query is a ResultSet, rs. I keyed in this code: while (rs.next()) { System.out.print(rs.getString(RoomID); } In the Tomcat server, it printed the results that I wanted. How to incorporate that results into the html code to show on the web page? I tried but it's give me error that cannot convert ResultSet into String. Thanks, Amy Cheung --- Kwok Peng Tuck [EMAIL PROTECTED] wrote: Any JDBC driver for mysql (that works for you) will do. Amy Cheung wrote: so what kind of connection is best? using the J/Connector or the OCBC one? --- Bill Barker [EMAIL PROTECTED] wrote: Assuming that you aren't using JDBCRealm, then it should be enough to put the jar file in $TOMCAT_HOME/lib/apps. If you are using JDBCRealm, then place it in $TOMCAT_HOME/lib/common. Setting the CLASSPATH is evil ;-). __ 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]
RE: Connetion between Tomcat MySQL
That's just not good advice at all. I don't know where people get the idea of touching CLASSPATH when they're talking about Tomcat and web-apps in general. Drivers should be placed in common/lib or WEB-INF/lib. That's IT. And mm.mysql.driver? You mean: com.mysql.jdbc.Driver And one last rant, as Chris Williams started to point out... ODBC is a Microsoft data access abstraction layer. ODBC = Microsoft Way of doing it JDBC = Java way of doing it So you'd only download or use the ODBC driver if you were accessing MySql from a VB or C# program. -Original Message- From: Schalk [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 6:20 AM To: Tomcat Users List Subject: Re: Connetion between Tomcat MySQL There is two things you can do. Set your CLASSPATH to include mm.mysql.driver and include the jar in your webapps lib folder. HTH Kind Regards Schalk Volume4 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connetion between Tomcat MySQL
You may want to put the JDBC driver jar file under %TOMCAT_HOME%/common/lib and try again. This is the location where the classloader loads the classes which makes available to all Tomcat applications. Marco - Original Message - From: Amy Cheung [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 4:40 AM Subject: Connetion between Tomcat MySQL Hi, I am using Tomcat 3.3.1 and MySQL 4.0 in Window XP. MySQL engine is running. When I run my jsp, it stated the error that import com.mysql.Driver not found. Anyone know how to install the driver properly? I read something about setting the class path. But where to set? I don't know much about the MSDOS command and specify the envirnomental variables in Window XP. I download both the J/Connector OCBC driver from MySQL. Where should be the exact location to store? Thanks, Amy Cheung __ 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]
Connetion between Tomcat MySQL
Hi, I am using Tomcat 3.3.1 and MySQL 4.0 in Window XP. MySQL engine is running. When I run my jsp, it stated the error that import com.mysql.Driver not found. Anyone know how to install the driver properly? I read something about setting the class path. But where to set? I don't know much about the MSDOS command and specify the envirnomental variables in Window XP. I download both the J/Connector OCBC driver from MySQL. Where should be the exact location to store? Thanks, Amy Cheung __ 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]
Re: Connetion between Tomcat MySQL
Assuming that you aren't using JDBCRealm, then it should be enough to put the jar file in $TOMCAT_HOME/lib/apps. If you are using JDBCRealm, then place it in $TOMCAT_HOME/lib/common. Setting the CLASSPATH is evil ;-). Amy Cheung [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am using Tomcat 3.3.1 and MySQL 4.0 in Window XP. MySQL engine is running. When I run my jsp, it stated the error that import com.mysql.Driver not found. Anyone know how to install the driver properly? I read something about setting the class path. But where to set? I don't know much about the MSDOS command and specify the envirnomental variables in Window XP. I download both the J/Connector OCBC driver from MySQL. Where should be the exact location to store? Thanks, Amy Cheung __ 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]
Re: Tomcat+MySQL. Intermitent DbcpException: Server configuration denies access to data source - Now pool exhausted
Hello! I got an answer in the mySQL list, that pointed out that my number of connections 500, was a lot more than the normal value of 100. Changing that solved the problem of the Server configuration error, but I've gone back to getting java.sql.SQLException: DBCP could not obtain an idle db connection, pool exhausted (whole exception follows). I thought the configuration parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter would free and log abandoned connections, but it doesn't seem to do it. Anyway, I have checked over all my result sets, statements and connections and I think they are all closed properly... So I'm still a bit stuck here... Some other person in the Commons list, suggested that there might be some problems with the DBCP, could it be so? Any other suggestions? Any help really appreciated. Monica Hi! I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the mysql- connector-java-2.0.14-bin.jar in commons/lib. The application runs normally, and usually about once or twice a day I get this exception org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server configuration denies access to data source. Once the exception occurs, it happens for every request and Tomcat needs restarting. Before getting this exception, I used to run out of connections, and therefore I added to the server.xml parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter I guess it could be related... I include the exception and my server.xml file. Any help appreciated. Monica 2003-08-07 15:55:02 StandardWrapperValve[StructureServlet]: Servlet.service () for servlet StructureServlet threw exception org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server configuration denies access to data source at org.apache.commons.dbcp.DriverConnectionFactory.createConnection (DriverConnectionFactory.java:85) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (PoolableConnectionFactory.java:184) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject (AbandonedObjectPool.java:117) at org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:110) at org.apache.commons.dbcp.BasicDataSource.getConnection (BasicDataSource.java:312) at com.ah.auk.db.DBUtil.getDBConnection(DBUtil.java:54) at com.ah.auk.db.DB.checkDBCon(DB.java:34) at com.ah.auk.db.HotelDBReader.getHotelsInGeoEntry (HotelDBReader.java:64) at com.ah.auk.delegates.CountyHelper.getHotelsPerCounty (CountyHelper.java:100) at com.ah.auk.box.CountyListBox.getCounties(CountyListBox.java:118) at com.ah.auk.box.CountyListBox.configure(CountyListBox.java:63) at com.ah.auk.core.BoxManager.configureBoxes(BoxManager.java:41) at com.ah.auk.structure.StructureServlet.doGet (StructureServlet.java:74) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at com.ah.auk.context.ContextFilter.doFilter(ContextFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at
Tomcat+MySQL. Intermitent DbcpException: Server configuration denies access to data source
Hi! I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the mysql- connector-java-2.0.14-bin.jar in commons/lib. The application runs normally, and usually about once or twice a day I get this exception org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server configuration denies access to data source. Once the exception occurs, it happens for every request and Tomcat needs restarting. Before getting this exception, I used to run out of connections, and therefore I added to the server.xml parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter I guess it could be related... I include the exception and my server.xml file. Any help appreciated. Monica 2003-08-07 15:55:02 StandardWrapperValve[StructureServlet]: Servlet.service () for servlet StructureServlet threw exception org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server configuration denies access to data source at org.apache.commons.dbcp.DriverConnectionFactory.createConnection (DriverConnectionFactory.java:85) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (PoolableConnectionFactory.java:184) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject (AbandonedObjectPool.java:117) at org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:110) at org.apache.commons.dbcp.BasicDataSource.getConnection (BasicDataSource.java:312) at com.ah.auk.db.DBUtil.getDBConnection(DBUtil.java:54) at com.ah.auk.db.DB.checkDBCon(DB.java:34) at com.ah.auk.db.HotelDBReader.getHotelsInGeoEntry (HotelDBReader.java:64) at com.ah.auk.delegates.CountyHelper.getHotelsPerCounty (CountyHelper.java:100) at com.ah.auk.box.CountyListBox.getCounties(CountyListBox.java:118) at com.ah.auk.box.CountyListBox.configure(CountyListBox.java:63) at com.ah.auk.core.BoxManager.configureBoxes(BoxManager.java:41) at com.ah.auk.structure.StructureServlet.doGet (StructureServlet.java:74) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at com.ah.auk.context.ContextFilter.doFilter(ContextFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.coyote.tomcat4.CoyoteAdapter.service (CoyoteAdapter.java:223) at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:261) at org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java:360) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604) at
[RePost] Tomcat+MySQL. Intermitent DbcpException: Server configuration denies access to data source
Hi! I haven't got any answers to my question and I'm really stuck with it. Please, could anybody give me some ideas or do you need any other information? Thansk a lot. Monica Hi! I'm using Tomcat 4.1.24 with Apache 2 and MySQL 4.0.13. I have the mysql- connector-java-2.0.14-bin.jar in commons/lib. The application runs normally, and usually about once or twice a day I get this exception org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server configuration denies access to data source. Once the exception occurs, it happens for every request and Tomcat needs restarting. Before getting this exception, I used to run out of connections, and therefore I added to the server.xml parameter namelogAbandoned/name valuetrue/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter I guess it could be related... I include the exception and my server.xml file. Any help appreciated. Monica 2003-08-07 15:55:02 StandardWrapperValve[StructureServlet]: Servlet.service () for servlet StructureServlet threw exception org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Server configuration denies access to data source at org.apache.commons.dbcp.DriverConnectionFactory.createConnection (DriverConnectionFactory.java:85) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (PoolableConnectionFactory.java:184) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java) at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject (AbandonedObjectPool.java:117) at org.apache.commons.dbcp.PoolingDataSource.getConnection (PoolingDataSource.java:110) at org.apache.commons.dbcp.BasicDataSource.getConnection (BasicDataSource.java:312) at com.ah.auk.db.DBUtil.getDBConnection(DBUtil.java:54) at com.ah.auk.db.DB.checkDBCon(DB.java:34) at com.ah.auk.db.HotelDBReader.getHotelsInGeoEntry (HotelDBReader.java:64) at com.ah.auk.delegates.CountyHelper.getHotelsPerCounty (CountyHelper.java:100) at com.ah.auk.box.CountyListBox.getCounties(CountyListBox.java:118) at com.ah.auk.box.CountyListBox.configure(CountyListBox.java:63) at com.ah.auk.core.BoxManager.configureBoxes(BoxManager.java:41) at com.ah.auk.structure.StructureServlet.doGet (StructureServlet.java:74) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at com.ah.auk.context.ContextFilter.doFilter(ContextFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardContext.invoke(Unknown Source) at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(Unknown Source) at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source) at org.apache.catalina.core.ContainerBase.invoke(Unknown Source) at org.apache.coyote.tomcat4.CoyoteAdapter.service
Are there any successful website using Apache Tomcat + MySQL + Windows OS?
Just curious about the scalibility of this combination. - Denis
Re: TOMCAT + MYSQL need help
Anthony Roque Adriano wrote: Sorry, i meant JDBC, all my configuration is default except for the polling i've added at server.xml and set debug level to 9. anyway here a sniff of the log file when i place the connector/j under my APPLICATION/WEB-INF/lib directory or at $CATALINA_HOME/common/lib or at CATALINA_HOME/shared/lib java.util.zip.ZipException: invalid END header (bad central directory offset) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:112) at java.util.jar.JarFile.init(JarFile.java:117) at java.util.jar.JarFile.init(JarFile.java:55) at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar dClassLoader.java:1082) at org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja va:221) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader Factory.java:204) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:155) Bootstrap: Class loader creation threw exception snip... Well, from here it looks like you have a corrupt jar file. You could see whether the jar command can read it (jar tvf your_jar_file.jar) - my guess is that it can't. If so, get a new copy. HTH, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TOMCAT + MYSQL need help
Hi, I've been searching the mailist but can't seem to find a problem similar to what i'm encountering. First here's a background of my setup MySQL server = mysql-server-3.23.54a-3 TomCat = jakarta-tomcat-4.1.18 ODBC = Connector/J 3.0.6-stable Base OS = RedHat Linux 7.3 JSDK = j2sdk1.4.1_02 $JAVA_HOME = /path/to/j2sdk1.4.1_02 $CATALINA_HOME = /path/to/jakarta-tomcat-4.1.18 Im making a program which will need to get the data from MySQL, All TOMCAT documents i've read all said to put my ODBC Connector (mysql-connector-java-3.0.6-stable-bin.jar) under $CATALINA_HOME/common/lib, but if I put the file there, TOMCAT is not starting, don't even have anything on the logfile. I also tried putting the connector/j on my application lib ($CATALINA_HOME/webapps/MYAPPLIC/WEB-INF/lib), Tomcat runs but my application is not. I also tried playing with $CLASSPATH to no avail. Anyone experienced this ? or am i just missing something ? Thanks, Mark
RE: TOMCAT + MYSQL need help
So, your problem is that is does not find the classpath. We place it under shared\lib *** Gustavo Cebrian Analyst/Programmer Want to improve the ROI on your EAI project? Download RV Tester and reduce your development and testing timescales by as much as 50%. http://www.greenhatconsulting.com/rvtester Green Hat Consulting Ltd. 107 Fleet Street, London EC4A 2AB DDI +44 (0)20 7936 9495 Mobile +44 (0)7788 922291 http://www.greenhatconsulting.com [EMAIL PROTECTED] *** -Original Message- From: Anthony Roque Adriano [mailto:[EMAIL PROTECTED] Sent: 18 March 2003 11:53 To: [EMAIL PROTECTED] Subject: TOMCAT + MYSQL need help Hi, I've been searching the mailist but can't seem to find a problem similar to what i'm encountering. First here's a background of my setup MySQL server = mysql-server-3.23.54a-3 TomCat = jakarta-tomcat-4.1.18 ODBC = Connector/J 3.0.6-stable Base OS = RedHat Linux 7.3 JSDK = j2sdk1.4.1_02 $JAVA_HOME = /path/to/j2sdk1.4.1_02 $CATALINA_HOME = /path/to/jakarta-tomcat-4.1.18 Im making a program which will need to get the data from MySQL, All TOMCAT documents i've read all said to put my ODBC Connector (mysql-connector-java-3.0.6-stable-bin.jar) under $CATALINA_HOME/common/lib, but if I put the file there, TOMCAT is not starting, don't even have anything on the logfile. I also tried putting the connector/j on my application lib ($CATALINA_HOME/webapps/MYAPPLIC/WEB-INF/lib), Tomcat runs but my application is not. I also tried playing with $CLASSPATH to no avail. Anyone experienced this ? or am i just missing something ? Thanks, Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TOMCAT + MYSQL need help
Anthony Roque Adriano wrote: Hi, I've been searching the mailist but can't seem to find a problem similar to what i'm encountering. First here's a background of my setup MySQL server = mysql-server-3.23.54a-3 TomCat = jakarta-tomcat-4.1.18 ODBC = Connector/J 3.0.6-stable Base OS = RedHat Linux 7.3 JSDK = j2sdk1.4.1_02 $JAVA_HOME = /path/to/j2sdk1.4.1_02 $CATALINA_HOME = /path/to/jakarta-tomcat-4.1.18 Im making a program which will need to get the data from MySQL, All TOMCAT documents i've read all said to put my ODBC Connector (mysql-connector-java-3.0.6-stable-bin.jar) under $CATALINA_HOME/common/lib, but if I put the file there, TOMCAT is not starting, don't even have anything on the logfile. I also tried putting the connector/j on my application lib ($CATALINA_HOME/webapps/MYAPPLIC/WEB-INF/lib), Tomcat runs but my application is not. I also tried playing with $CLASSPATH to no avail. Anyone experienced this ? or am i just missing something ? ODBC? Are you sure you mean ODBC, and not JDBC? How do you connect to the db? Via JNDI, or programmatically in the servlet? What DEBUG level do you have set in server.xml elsewhere? Are you sure the logs are empty? You need to post LOTS more information before we can help you! Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TOMCAT + MYSQL need help
Sorry, i meant JDBC, all my configuration is default except for the polling i've added at server.xml and set debug level to 9. anyway here a sniff of the log file when i place the connector/j under my APPLICATION/WEB-INF/lib directory or at $CATALINA_HOME/common/lib or at CATALINA_HOME/shared/lib java.util.zip.ZipException: invalid END header (bad central directory offset) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.init(ZipFile.java:112) at java.util.jar.JarFile.init(JarFile.java:117) at java.util.jar.JarFile.init(JarFile.java:55) at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar dClassLoader.java:1082) at org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja va:221) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader Factory.java:204) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:155) Bootstrap: Class loader creation threw exception java.lang.IllegalArgumentException: addRepositoryInternal: java.util.zip.ZipException: invalid END header (bad central directory offset) at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(Standar dClassLoader.java:1110) at org.apache.catalina.loader.StandardClassLoader.init(StandardClassLoader.ja va:221) at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoader Factory.java:204) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:155) Mark - Original Message - From: Martin Jacobson [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 18, 2003 9:51 PM Subject: Re: TOMCAT + MYSQL need help Anthony Roque Adriano wrote: Hi, I've been searching the mailist but can't seem to find a problem similar to what i'm encountering. First here's a background of my setup MySQL server = mysql-server-3.23.54a-3 TomCat = jakarta-tomcat-4.1.18 ODBC = Connector/J 3.0.6-stable Base OS = RedHat Linux 7.3 JSDK = j2sdk1.4.1_02 $JAVA_HOME = /path/to/j2sdk1.4.1_02 $CATALINA_HOME = /path/to/jakarta-tomcat-4.1.18 Im making a program which will need to get the data from MySQL, All TOMCAT documents i've read all said to put my ODBC Connector (mysql-connector-java-3.0.6-stable-bin.jar) under $CATALINA_HOME/common/lib, but if I put the file there, TOMCAT is not starting, don't even have anything on the logfile. I also tried putting the connector/j on my application lib ($CATALINA_HOME/webapps/MYAPPLIC/WEB-INF/lib), Tomcat runs but my application is not. I also tried playing with $CLASSPATH to no avail. Anyone experienced this ? or am i just missing something ? ODBC? Are you sure you mean ODBC, and not JDBC? How do you connect to the db? Via JNDI, or programmatically in the servlet? What DEBUG level do you have set in server.xml elsewhere? Are you sure the logs are empty? You need to post LOTS more information before we can help you! Martin - 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]
RE: Tomcat/Mysql/Woody
thanks Stefan for the idea but the problem is somewhere else. the problem comes from java just have to define CATALINA_OPTS=-Dfile.encoding=iso8859-1 before starting tomcat hope that will help other persons.. Thanks to Loic Luc At 10:15 03/09/2002 +0200, you wrote: Just an idea but maybe the font you are using on Woody is unable to display the special characters and replaces them instead with a '?'. Stefan Langer -- 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: Tomcat/Mysql/Woody
At 15:10 03/09/2002 +1000, you wrote: On Mon, Sep 02, 2002 at 04:36:11PM +0200, Luc Santeramo wrote: ... this jsp displays, on the potato box : -- hé hé hé Revue d'histoire consacrée à la période de la Révolution française et de l'Empire. ... -- the same jsp displays, on the woody box : -- hé hé hé Revue d'histoire consacr?e ? la p?riode de la R?volution fran?aise et de l'Empire. ... -- as you can see, french special characters are now ? when they are extracted from the mysql DB. but if I check the mysql manually or with phpmyadmin, french character are still there ! I'm using mysql-3.23.51 and jakarta-tomcat-4.0.4 on both systems same config files ! if anybody has a clue . Probably your system locale changed. If you type 'locale', what does it show? You can run 'dpkg-reconfigure locale' as root to configure installed locales and set a default. well, I tried to I set up FR_fr iso 8859 1 but did not change anything this is what I got on the 2 different boxes : woody box:~# locale LANG=POSIX LC_CTYPE=POSIX LC_NUMERIC=POSIX LC_TIME=POSIX LC_COLLATE=POSIX LC_MONETARY=POSIX LC_MESSAGES=POSIX LC_PAPER=POSIX LC_NAME=POSIX LC_ADDRESS=POSIX LC_TELEPHONE=POSIX LC_MEASUREMENT=POSIX LC_IDENTIFICATION=POSIX LC_ALL= potato box:~# locale LANG=POSIX LC_CTYPE=POSIX LC_NUMERIC=POSIX LC_TIME=POSIX LC_COLLATE=POSIX LC_MONETARY=POSIX LC_MESSAGES=POSIX LC_ALL= I know something has changed but I can't find what for the moment I'm lost Thx Luc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat/Mysql/Woody
Just an idea but maybe the font you are using on Woody is unable to display the special characters and replaces them instead with a '?'. Stefan Langer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat/Mysql/Woody
At 10:15 03/09/2002 +0200, you wrote: Just an idea but maybe the font you are using on Woody is unable to display the special characters and replaces them instead with a '?'. actually, I use internet explorer to see the result of the query If I do the same query using phpmyadmin with apache, I can see the french characters !!! strange isn't it ? :) Luc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat/Mysql/Woody
Hi, I'm sorry, I'm new to this mailing list, and I didn't find any post in the archive about this subjector I don't know how to search. I've got a problem since I upgraded from debian potato to debian woody. the following jsp file doesn't display the same thing on the different debian distro. it just extract data from a mysql database. - %@ page import=java.sql.* % % String connectionURL = jdbc:mysql://localhost:3306/dbname?user=dbuserpassword=xxx; Connection connection = null; Statement statement = null; ResultSet rs = null; % html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head hé hé hé body % Class.forName(org.gjt.mm.mysql.Driver).newInstance(); connection = DriverManager.getConnection(connectionURL, , ); statement = connection.createStatement(); rs = statement.executeQuery(SELECT * FROM xxx); while (rs.next()) { out.println(rs.getString(description)+br); } rs.close(); % /body/html - this jsp displays, on the potato box : -- hé hé hé Revue d'histoire consacrée à la période de la Révolution française et de l'Empire. ... -- the same jsp displays, on the woody box : -- hé hé hé Revue d'histoire consacr?e ? la p?riode de la R?volution fran?aise et de l'Empire. ... -- as you can see, french special characters are now ? when they are extracted from the mysql DB. but if I check the mysql manually or with phpmyadmin, french character are still there ! I'm using mysql-3.23.51 and jakarta-tomcat-4.0.4 on both systems same config files ! if anybody has a clue . thanks a lot Luc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat/Mysql/Woody
On Mon, Sep 02, 2002 at 04:36:11PM +0200, Luc Santeramo wrote: ... this jsp displays, on the potato box : -- hé hé hé Revue d'histoire consacrée à la période de la Révolution française et de l'Empire. ... -- the same jsp displays, on the woody box : -- hé hé hé Revue d'histoire consacr?e ? la p?riode de la R?volution fran?aise et de l'Empire. ... -- as you can see, french special characters are now ? when they are extracted from the mysql DB. but if I check the mysql manually or with phpmyadmin, french character are still there ! I'm using mysql-3.23.51 and jakarta-tomcat-4.0.4 on both systems same config files ! if anybody has a clue . Probably your system locale changed. If you type 'locale', what does it show? You can run 'dpkg-reconfigure locale' as root to configure installed locales and set a default. --Jeff thanks a lot Luc -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat MySQL Run On Read-Only Media ..
I have a web application containing Servlets JSP pages and uses data on Oracle 9i Server. Data is like a product catalogue. I plan to periodically distribute this system (to people who do not have enough bandwidth to access to our LAN) on CDROM media which contains binaries of a JVM, Tomcat Server, Servlets JSPs and MySQL Server running with special parameters and data dumped into MySQL from Oracle. Is there anyone who accomplished this task?
RE: Tomcat MySQL Run On Read-Only Media ..
I would put only static documents on the CD if I were you... You won't look like professional if you ship a CD containing a JVM, Tomcat MySQL to install. Personally, I would not install it. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 10:29 To: Tomcat-User@Jakarta. Apache. Org (E-mail) Subject: Tomcat MySQL Run On Read-Only Media .. I have a web application containing Servlets JSP pages and uses data on Oracle 9i Server. Data is like a product catalogue. I plan to periodically distribute this system (to people who do not have enough bandwidth to access to our LAN) on CDROM media which contains binaries of a JVM, Tomcat Server, Servlets JSPs and MySQL Server running with special parameters and data dumped into MySQL from Oracle. Is there anyone who accomplished this task? DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat MySQL Run On Read-Only Media ..
The user will install them , the man means that the user will run tomcat and mysql services from the CD . You did not get what he means . Thanks - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 15, 2002 4:06 AM Subject: RE: Tomcat MySQL Run On Read-Only Media .. I would put only static documents on the CD if I were you... You won't look like professional if you ship a CD containing a JVM, Tomcat MySQL to install. Personally, I would not install it. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 10:29 To: Tomcat-User@Jakarta. Apache. Org (E-mail) Subject: Tomcat MySQL Run On Read-Only Media .. I have a web application containing Servlets JSP pages and uses data on Oracle 9i Server. Data is like a product catalogue. I plan to periodically distribute this system (to people who do not have enough bandwidth to access to our LAN) on CDROM media which contains binaries of a JVM, Tomcat Server, Servlets JSPs and MySQL Server running with special parameters and data dumped into MySQL from Oracle. Is there anyone who accomplished this task? DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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: Tomcat MySQL Run On Read-Only Media ..
I understood very well what he means. I simply tell people will not be happy if they have to install or to run many programs to browse his CD... My personal opinion is : as a customer, I would install (fear of viruses, lack of competences, lack of time...) a JVM, Tomcat MySQL to browse a CD. Would you? Greetings, André POWROZNIK -Original Message- From: Mohammed Omar [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 23:16 To: Tomcat Users List Subject: Re: Tomcat MySQL Run On Read-Only Media .. The user will install them , the man means that the user will run tomcat and mysql services from the CD . You did not get what he means . Thanks - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 15, 2002 4:06 AM Subject: RE: Tomcat MySQL Run On Read-Only Media .. I would put only static documents on the CD if I were you... You won't look like professional if you ship a CD containing a JVM, Tomcat MySQL to install. Personally, I would not install it. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 10:29 To: Tomcat-User@Jakarta. Apache. Org (E-mail) Subject: Tomcat MySQL Run On Read-Only Media .. I have a web application containing Servlets JSP pages and uses data on Oracle 9i Server. Data is like a product catalogue. I plan to periodically distribute this system (to people who do not have enough bandwidth to access to our LAN) on CDROM media which contains binaries of a JVM, Tomcat Server, Servlets JSPs and MySQL Server running with special parameters and data dumped into MySQL from Oracle. Is there anyone who accomplished this task? DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat MySQL Run On Read-Only Media ..
User will not install anything. I will put pre-installed directories of JVM, Tomcat and MySQL on the CD with a batch file that runs them with !some! parameters. Everything is up automatically Imagine? For example: \JDK \JDK\bin ... \Tomcat \Tomcat\bin ... \MySQL \MySQL\bin \DATA \webcontents AUTORUN.BAT (for Windows machines) is at the root of the CD. tomcat\bin\tomcat --some-parameters mysql\bin\mysqld-nt --some-parameters-that-open-only-specified-ini-file start \webcontent\StartMyAppUp.html... and so on -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 2:21 PM To: [EMAIL PROTECTED] Subject: RE: Tomcat MySQL Run On Read-Only Media .. I understood very well what he means. I simply tell people will not be happy if they have to install or to run many programs to browse his CD... My personal opinion is : as a customer, I would install (fear of viruses, lack of competences, lack of time...) a JVM, Tomcat MySQL to browse a CD. Would you? Greetings, André POWROZNIK -Original Message- From: Mohammed Omar [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 23:16 To: Tomcat Users List Subject: Re: Tomcat MySQL Run On Read-Only Media .. The user will install them , the man means that the user will run tomcat and mysql services from the CD . You did not get what he means . Thanks - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 15, 2002 4:06 AM Subject: RE: Tomcat MySQL Run On Read-Only Media .. I would put only static documents on the CD if I were you... You won't look like professional if you ship a CD containing a JVM, Tomcat MySQL to install. Personally, I would not install it. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 10:29 To: Tomcat-User@Jakarta. Apache. Org (E-mail) Subject: Tomcat MySQL Run On Read-Only Media .. I have a web application containing Servlets JSP pages and uses data on Oracle 9i Server. Data is like a product catalogue. I plan to periodically distribute this system (to people who do not have enough bandwidth to access to our LAN) on CDROM media which contains binaries of a JVM, Tomcat Server, Servlets JSPs and MySQL Server running with special parameters and data dumped into MySQL from Oracle. Is there anyone who accomplished this task? DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat MySQL Run On Read-Only Media ..
I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? 3) To run JSP you need a JDK, not a JRE. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? And I did not yet spoke about some of these programs that may interfere with your customers programs. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 13:44 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. User will not install anything. I will put pre-installed directories of JVM, Tomcat and MySQL on the CD with a batch file that runs them with !some! parameters. Everything is up automatically Imagine? For example: \JDK \JDK\bin ... \Tomcat \Tomcat\bin ... \MySQL \MySQL\bin \DATA \webcontents AUTORUN.BAT (for Windows machines) is at the root of the CD. tomcat\bin\tomcat --some-parameters mysql\bin\mysqld-nt --some-parameters-that-open-only-specified-ini-file start \webcontent\StartMyAppUp.html... and so on -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 2:21 PM To: [EMAIL PROTECTED] Subject: RE: Tomcat MySQL Run On Read-Only Media .. I understood very well what he means. I simply tell people will not be happy if they have to install or to run many programs to browse his CD... My personal opinion is : as a customer, I would install (fear of viruses, lack of competences, lack of time...) a JVM, Tomcat MySQL to browse a CD. Would you? Greetings, André POWROZNIK -Original Message- From: Mohammed Omar [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 23:16 To: Tomcat Users List Subject: Re: Tomcat MySQL Run On Read-Only Media .. The user will install them , the man means that the user will run tomcat and mysql services from the CD . You did not get what he means . Thanks - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 15, 2002 4:06 AM Subject: RE: Tomcat MySQL Run On Read-Only Media .. I would put only static documents on the CD if I were you... You won't look like professional if you ship a CD containing a JVM, Tomcat MySQL to install. Personally, I would not install it. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 10:29 To: Tomcat-User@Jakarta. Apache. Org (E-mail) Subject: Tomcat MySQL Run On Read-Only Media .. I have a web application containing Servlets JSP pages and uses data on Oracle 9i Server. Data is like a product catalogue. I plan to periodically distribute this system (to people who do not have enough bandwidth to access to our LAN) on CDROM media which contains binaries of a JVM, Tomcat Server, Servlets JSPs and MySQL Server running with special parameters and data dumped into MySQL from Oracle. Is there anyone who accomplished this task? DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands
Re: Tomcat MySQL Run On Read-Only Media ..
It sounds like the webapp is read only system (since it is going on a cd). If your UI is link based (no forms/sessions) - could you use a web sucker (like wget in recursive mode) and make a static copy of the site? Otherwise - flash is great for things like this. (But it is reinventing the wheel) [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? 3) To run JSP you need a JDK, not a JRE. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? And I did not yet spoke about some of these programs that may interfere with your customers programs. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 13:44 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. User will not install anything. I will put pre-installed directories of JVM, Tomcat and MySQL on the CD with a batch file that runs them with !some! parameters. Everything is up automatically Imagine? For example: \JDK \JDK\bin ... \Tomcat \Tomcat\bin ... \MySQL \MySQL\bin \DATA \webcontents AUTORUN.BAT (for Windows machines) is at the root of the CD. tomcat\bin\tomcat --some-parameters mysql\bin\mysqld-nt --some-parameters-that-open-only-specified-ini-file start \webcontent\StartMyAppUp.html... and so on -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 2:21 PM To: [EMAIL PROTECTED] Subject: RE: Tomcat MySQL Run On Read-Only Media .. I understood very well what he means. I simply tell people will not be happy if they have to install or to run many programs to browse his CD... My personal opinion is : as a customer, I would install (fear of viruses, lack of competences, lack of time...) a JVM, Tomcat MySQL to browse a CD. Would you? Greetings, André POWROZNIK -Original Message- From: Mohammed Omar [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 23:16 To: Tomcat Users List Subject: Re: Tomcat MySQL Run On Read-Only Media .. The user will install them , the man means that the user will run tomcat and mysql services from the CD . You did not get what he means . Thanks - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 15, 2002 4:06 AM Subject: RE: Tomcat MySQL Run On Read-Only Media .. I would put only static documents on the CD if I were you... You won't look like professional if you ship a CD containing a JVM, Tomcat MySQL to install. Personally, I would not install it. Greetings, André POWROZNIK -Original Message- From: Murat Buyukkal ([EMAIL PROTECTED]) [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 10:29 To: Tomcat-User@Jakarta. Apache. Org (E-mail) Subject: Tomcat MySQL Run On Read-Only Media .. I have a web application containing Servlets JSP pages and uses data on Oracle 9i Server. Data is like a product catalogue. I plan to periodically distribute this system (to people who do not have enough bandwidth to access to our LAN) on CDROM media which contains binaries of a JVM, Tomcat Server, Servlets JSPs and MySQL Server running with special parameters and data dumped into MySQL from Oracle. Is there anyone who accomplished this task? DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named
RE: Tomcat MySQL Run On Read-Only Media ..
On Mon, 2002-07-15 at 13:59, [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? Who cares.. If they order it, they have to.. 3) To run JSP you need a JDK, not a JRE. Wrong here.. Just if you want your jsp's to be dynamic.. Just precompile them.. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... Use hsqldb instead which has a memory database.. 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... ?? 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? Not your problem I guess ;).. He was asking HOW not a project plan of things to resolve before hand.. TIP: Search the archives (maybe a year ago or something) there was a big thread about it, which actually worked towards a solution. Mvgr, Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat MySQL Run On Read-Only Media ..
Hello, About the customers : they define the requirements. Who does not meet their requirements, lose them (especially the big ones)... Greetings, André POWROZNIK -Original Message- From: Martin van den Bemt [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 14:23 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. On Mon, 2002-07-15 at 13:59, [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? Who cares.. If they order it, they have to.. 3) To run JSP you need a JDK, not a JRE. Wrong here.. Just if you want your jsp's to be dynamic.. Just precompile them.. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... Use hsqldb instead which has a memory database.. 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... ?? 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? Not your problem I guess ;).. He was asking HOW not a project plan of things to resolve before hand.. TIP: Search the archives (maybe a year ago or something) there was a big thread about it, which actually worked towards a solution. Mvgr, Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat MySQL Run On Read-Only Media ..
On Monday 15 July 2002 13:22, you wrote: On Mon, 2002-07-15 at 13:59, [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? There is a project (I forget its name) which is building a version of Linux designed to run on a CD. Thus you do not have to make any assumptions about what is on the PC. You can lock this version down so that it does not even look at their disk, and provided you use the VESA framebuffer you are more or less guaranteed to get it to run on the screen. I am sure that this would provide you a very good platform for such an application. Who cares.. If they order it, they have to.. 3) To run JSP you need a JDK, not a JRE. Wrong here.. Just if you want your jsp's to be dynamic.. Just precompile them.. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... Use hsqldb instead which has a memory database.. 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... ?? 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? Not your problem I guess ;).. He was asking HOW not a project plan of things to resolve before hand.. TIP: Search the archives (maybe a year ago or something) there was a big thread about it, which actually worked towards a solution. Mvgr, Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat MySQL Run On Read-Only Media ..
Agreed, but only with custom made software.. At the most you can ask your current customers to ask if they can agree to a certain solution, but hey : he is asking what the solution might be! Before he gets that answered customer contact is a big waste of time Mvgr, Martin On Mon, 2002-07-15 at 15:19, [EMAIL PROTECTED] wrote: Hello, About the customers : they define the requirements. Who does not meet their requirements, lose them (especially the big ones)... Greetings, André POWROZNIK -Original Message- From: Martin van den Bemt [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 14:23 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. On Mon, 2002-07-15 at 13:59, [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? Who cares.. If they order it, they have to.. 3) To run JSP you need a JDK, not a JRE. Wrong here.. Just if you want your jsp's to be dynamic.. Just precompile them.. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... Use hsqldb instead which has a memory database.. 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... ?? 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? Not your problem I guess ;).. He was asking HOW not a project plan of things to resolve before hand.. TIP: Search the archives (maybe a year ago or something) there was a big thread about it, which actually worked towards a solution. Mvgr, Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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: Tomcat MySQL Run On Read-Only Media ..
A little bit off-topic, but if it is not a custom-made software and if it targets a lot of not specific users, it cannot only rely on a particular configuration (imo). -Original Message- From: Martin van den Bemt [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:30 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. Agreed, but only with custom made software.. At the most you can ask your current customers to ask if they can agree to a certain solution, but hey : he is asking what the solution might be! Before he gets that answered customer contact is a big waste of time Mvgr, Martin On Mon, 2002-07-15 at 15:19, [EMAIL PROTECTED] wrote: Hello, About the customers : they define the requirements. Who does not meet their requirements, lose them (especially the big ones)... Greetings, André POWROZNIK -Original Message- From: Martin van den Bemt [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 14:23 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. On Mon, 2002-07-15 at 13:59, [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? Who cares.. If they order it, they have to.. 3) To run JSP you need a JDK, not a JRE. Wrong here.. Just if you want your jsp's to be dynamic.. Just precompile them.. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... Use hsqldb instead which has a memory database.. 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... ?? 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? Not your problem I guess ;).. He was asking HOW not a project plan of things to resolve before hand.. TIP: Search the archives (maybe a year ago or something) there was a big thread about it, which actually worked towards a solution. Mvgr, Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat MySQL Run On Read-Only Media ..(off-topic)
Here are two: http://www.virtual-linux.org/ http://www.demolinux.org/ I've seen demoLinux...it was pretty cool. Couldn't do much, but there's no reason why you couldn't burn a custom CD with both the Linux distro and the web application on it. You'd not only have to setup a database in RAM, you'd also have to do your logging in RAM, or turn your logging off, as well as tell tomcat to create it's work directories in RAM. Possible, I think, but certainly not trivial. John Turner [EMAIL PROTECTED] http://www.aas.com -Original Message- From: David Goodenough [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 9:24 AM To: Tomcat Users List Subject: Re: Tomcat MySQL Run On Read-Only Media .. On Monday 15 July 2002 13:22, you wrote: On Mon, 2002-07-15 at 13:59, [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? There is a project (I forget its name) which is building a version of Linux designed to run on a CD. Thus you do not have to make any assumptions about what is on the PC. You can lock this version down so that it does not even look at their disk, and provided you use the VESA framebuffer you are more or less guaranteed to get it to run on the screen. I am sure that this would provide you a very good platform for such an application. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat MySQL Run On Read-Only Media ..
I was just saying 2 mails ago : Who cares about customers ?? Tomcat-user list is not a marketing list.. He just wants to know how he can get that thing running on cd. he probably had a good reason to ask for this solution.. My reamrks were made so it got back ON topic again.. Sorry about the grumpy attitude, just thought he was asking on how to do that, not how to market it and do customer surveys. Mvgr, Martin On Mon, 2002-07-15 at 15:41, [EMAIL PROTECTED] wrote: A little bit off-topic, but if it is not a custom-made software and if it targets a lot of not specific users, it cannot only rely on a particular configuration (imo). -Original Message- From: Martin van den Bemt [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 15:30 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. Agreed, but only with custom made software.. At the most you can ask your current customers to ask if they can agree to a certain solution, but hey : he is asking what the solution might be! Before he gets that answered customer contact is a big waste of time Mvgr, Martin On Mon, 2002-07-15 at 15:19, [EMAIL PROTECTED] wrote: Hello, About the customers : they define the requirements. Who does not meet their requirements, lose them (especially the big ones)... Greetings, André POWROZNIK -Original Message- From: Martin van den Bemt [mailto:[EMAIL PROTECTED]] Sent: 15 July 2002 14:23 To: Tomcat Users List Subject: RE: Tomcat MySQL Run On Read-Only Media .. On Mon, 2002-07-15 at 13:59, [EMAIL PROTECTED] wrote: I am afraid it is not as as much easy as you think... 1) Will your customer agree to run these applications on their computer? 2) What if they are not using a PC (Mac?) or if they are not using Windows (Linux?)? Who cares.. If they order it, they have to.. 3) To run JSP you need a JDK, not a JRE. Wrong here.. Just if you want your jsp's to be dynamic.. Just precompile them.. 4) If you copy JDK, Tomcat MySQL files on the CD, will it work? In order to run they need : - DLLs in Windows system directories; - keys in Windows registry; - write access to some of their files... Use hsqldb instead which has a memory database.. 5) What about AUTOEXEC.BAT? It will do nothing if you put it on a CD : it needs to be in C:\, and there is already one there... ?? 6) What if your customers have problems running your CD? Will you create a hotline ;-) ? Not your problem I guess ;).. He was asking HOW not a project plan of things to resolve before hand.. TIP: Search the archives (maybe a year ago or something) there was a big thread about it, which actually worked towards a solution. Mvgr, Martin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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] DISCLAIMER This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. -- 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]
AW: Tomcat MySQL Run On Read-Only Media ..
Unless you know your customers very well that isn't a road I would follow. I can hardly imagine cutomers that are willing to loose there primary os just to view a product catalog. That happens at least for the time you run the cd. (No quick copy and paste to the mail reader, no quit look at the internet site to order online, ...) Or do you know a solution that just opens a linux window without reboot under any os that might be used to view the cd. (VM Ware would allow such thing but, that requires that the customer alrady has it) I would recommend to define the java runtime environment as minimal requirement for the customer. (This way you don't need dll's, registry changes etc). Than you can deliver tomcat standalone with a pure java in-memory database and precompiled jsp's on cd -Ursprüngliche Nachricht- Von: David Goodenough [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 15. Juli 2002 15:24 An: Tomcat Users List Betreff: Re: Tomcat MySQL Run On Read-Only Media .. There is a project (I forget its name) which is building a version of Linux designed to run on a CD. Thus you do not have to make any assumptions about what is on the PC. You can lock this version down so that it does not even look at their disk, and provided you use the VESA framebuffer you are more or less guaranteed to get it to run on the screen. I am sure that this would provide you a very good platform for such an application. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]