Re: URGENT, Tomcat MySQL problems
why don't you try to put the .jar in the lib directory in the tomcat home tomcat-home/lib... and restart tomcat... Carlos Chaparro Taller Web, Equant Tel: 6211072 [EMAIL PROTECTED]
URGENT, Tomcat MySQL problems
Hi guys, I am getting the following error: javax.servlet.ServletException: No suitable driver at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457) at org.apache.jsp.ivf_0005fclinic_0005fsearch$jsp._jspService(ivf_0005fclinic_0005fsearch$jsp.java:145) .. and I believe that I have the driver installed in the correct place. I am running Tomcat 4.0 with MySQL 3.23.43 with Redhat Linux 7.1. I placed the 'mm.mysql-2.0.4-bin.jar' file in /usr/java/jdk1.3.1/jre/lib/ext directory (as instructed by some solutions in the mailing list) but the driver still will not work. In my 'server.xml' file I have the following Realm defined : Realm className=org.apache.catalina.realm.JDBCRealm debug=99 connectionName=website connectionPassword=user driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://linuxsvr.hfea.gov.uk/dba userTable=user userNameCol=User userCredCol=Password/ In my .jsp page the extract where the exception occurs is : String MM_centres_web_database_DRIVER = org.gjt.mm.mysql.Driver; String MM_centres_web_database_USERNAME = website; String MM_centres_web_database_PASSWORD = user; String MM_centres_web_database_STRING = jdbc:mysql://linuxsvr.hfea.gov.uk/dba; // end // HTML // begin [file=/Connections/centres_web_database.jsp;from=(10,2);to=(14,2)] out.write(\r\n\r\n\r\n\r\n ); // end // HTML // begin [file=/ivf_clinic_search.jsp;from=(2,58);to=(3,0)] out.write(\r\n); // end // begin [file=/ivf_clinic_search.jsp;from=(3,2);to=(12,0)] Driver DriverRecordset1 = (Driver)Class.forName(MM_centres_web_database_DRIVER).newInstance(); Connection ConnRecordset1 = DriverManager.getConnection(MM_centres_web_database_STRING,MM_centres_web_database_USERNAME,MM_centres_web_database_PASSWORD); PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement(SELECT * FROM DBA.region_pg); ResultSet Recordset1 = StatementRecordset1.executeQuery(); boolean Recordset1_isEmpty = !Recordset1.next(); boolean Recordset1_hasData = !Recordset1_isEmpty; Object Recordset1_data; int Recordset1_numRows = 0; // end I have completely run out of ideas as to why this exception is occuring, I would be very grateful for any suggestions as my manager is breathing down my neck! Thanks again, Paul Nokia Game is on again. Go to http://uk.yahoo.com/nokiagame/ and join the new all media adventure before November 3rd.
Re: URGENT, Tomcat MySQL problems
I think you have to put the jar file into either $CATALINA_HOME/lib or $CATALINA_HOME/common/lib Hi guys, I am getting the following error: javax.servlet.ServletException: No suitable driver at org.apache.jasper.runtime.PageContextImpl.handlePageException (PageContextImpl.java:457) at org.apache.jsp.ivf_0005fclinic_0005fsearch$jsp._jspService (ivf_0005fclinic_0005fsearch$jsp.java:145) .. and I believe that I have the driver installed in the correct place. I am running Tomcat 4.0 with MySQL 3.23.43 with Redhat Linux 7.1. I placed the 'mm.mysql-2.0.4-bin.jar' file in /usr/java/jdk1.3.1/jre/lib/ext directory (as instructed by some solutions in the mailing list) but the driver still will not work. In my 'server.xml' file I have the following Realm defined : Realm className=org.apache.catalina.realm.JDBCRealm debug=99 connectionName=website connectionPassword=user driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://linuxsvr.hfea.gov.uk/dba userTable=user userNameCol=User userCredCol=Password/ In my .jsp page the extract where the exception occurs is : String MM_centres_web_database_DRIVER = org.gjt.mm.mysql.Driver; String MM_centres_web_database_USERNAME = website; String MM_centres_web_database_PASSWORD = user; String MM_centres_web_database_STRING = jdbc:mysql://linuxsvr.hfea.gov.uk/dba; // end // HTML // begin [file=/Connections/centres_web_database.jsp;from=(10,2);to=(14,2)] out.write(\r\n\r\n\r\n\r\n ); // end // HTML // begin [file=/ivf_clinic_search.jsp;from=(2,58);to=(3,0)] out.write(\r\n); // end // begin [file=/ivf_clinic_search.jsp;from=(3,2);to=(12,0)] Driver DriverRecordset1 = (Driver)Class.forName(MM_centres_web_database_DRIVER).newInstance(); Connection ConnRecordset1 = DriverManager.getConnection (MM_centres_web_database_STRING,MM_centres_web_database_USERNAME,MM_centres_ web_database_PASSWORD); PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement(SELECT * FROM DBA.region_pg); ResultSet Recordset1 = StatementRecordset1.executeQuery(); boolean Recordset1_isEmpty = !Recordset1.next(); boolean Recordset1_hasData = !Recordset1_isEmpty; Object Recordset1_data; int Recordset1_numRows = 0; // end I have completely run out of ideas as to why this exception is occuring, I would be very grateful for any suggestions as my manager is breathing down my neck! Thanks again, Paul Nokia Game is on again. Go to http://uk.yahoo.com/nokiagame/ and join the new all media adventure before November 3rd.
RE: URGENT, Tomcat MySQL problems
I'm not a MySQL user, but I really don't think you should EVER put anything directly in the JRE directory. It should go either in your Tomcat lib or better yet (if application specific) in your WEB-INF/lib directory. -Original Message- From: Paul Davies [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 11:57 AM To: [EMAIL PROTECTED] Subject: URGENT, Tomcat MySQL problems Hi guys, I am getting the following error: javax.servlet.ServletException: No suitable driver at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:457) at org.apache.jsp.ivf_0005fclinic_0005fsearch$jsp._jspService(ivf_0005fclinic_0 005fsearch$jsp.java:145) .. and I believe that I have the driver installed in the correct place. I am running Tomcat 4.0 with MySQL 3.23.43 with Redhat Linux 7.1. I placed the 'mm.mysql-2.0.4-bin.jar' file in /usr/java/jdk1.3.1/jre/lib/ext directory (as instructed by some solutions in the mailing list) but the driver still will not work. In my 'server.xml' file I have the following Realm defined : Realm className=org.apache.catalina.realm.JDBCRealm debug=99 connectionName=website connectionPassword=user driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://linuxsvr.hfea.gov.uk/dba userTable=user userNameCol=User userCredCol=Password/ In my .jsp page the extract where the exception occurs is : String MM_centres_web_database_DRIVER = org.gjt.mm.mysql.Driver; String MM_centres_web_database_USERNAME = website; String MM_centres_web_database_PASSWORD = user; String MM_centres_web_database_STRING = jdbc:mysql://linuxsvr.hfea.gov.uk/dba; // end // HTML // begin [file=/Connections/centres_web_database.jsp;from=(10,2);to=(14,2)] out.write(\r\n\r\n\r\n\r\n ); // end // HTML // begin [file=/ivf_clinic_search.jsp;from=(2,58);to=(3,0)] out.write(\r\n); // end // begin [file=/ivf_clinic_search.jsp;from=(3,2);to=(12,0)] Driver DriverRecordset1 = (Driver)Class.forName(MM_centres_web_database_DRIVER).newInstance(); Connection ConnRecordset1 = DriverManager.getConnection(MM_centres_web_database_STRING,MM_centres_web_da tabase_USERNAME,MM_centres_web_database_PASSWORD); PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement(SELECT * FROM DBA.region_pg); ResultSet Recordset1 = StatementRecordset1.executeQuery(); boolean Recordset1_isEmpty = !Recordset1.next(); boolean Recordset1_hasData = !Recordset1_isEmpty; Object Recordset1_data; int Recordset1_numRows = 0; // end I have completely run out of ideas as to why this exception is occuring, I would be very grateful for any suggestions as my manager is breathing down my neck! Thanks again, Paul Nokia Game is on again. Go to http://uk.yahoo.com/nokiagame/ and join the new all media adventure before November 3rd.
Re: URGENT, Tomcat MySQL problems
I did this install on my dev machine just recently. First, if mm.mysql-2.0.4-bin.jar is one you downloaded, you need to unzip it and use the mm.mysql-2.0.4.jar file compressed inside it. I don't quite know why they packaged it that way, but there it is. The downloaded JAR file also contains source and docs all packaged up together. Then place mm.mysql-2.0.4.jar where it works best for you. If you use container based security in Tomcat, then the JAR file needs to be in CATALINA_HOME$/common/lib so that Tomcat can use it as well as your app. Otherwise CATALINA_HOME$/lib or WEB-INF/lib should work depending on whether you want it available to all apps or just one. Hope this helps you. --David Smith On Tuesday 23 October 2001 11:57 am, you wrote: Hi guys, I am getting the following error: javax.servlet.ServletException: No suitable driver at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm pl.java:457) at org.apache.jsp.ivf_0005fclinic_0005fsearch$jsp._jspService(ivf_0005fclinic_ 0005fsearch$jsp.java:145) .. and I believe that I have the driver installed in the correct place. I am running Tomcat 4.0 with MySQL 3.23.43 with Redhat Linux 7.1. I placed the 'mm.mysql-2.0.4-bin.jar' file in /usr/java/jdk1.3.1/jre/lib/ext directory (as instructed by some solutions in the mailing list) but the driver still will not work. In my 'server.xml' file I have the following Realm defined : Realm className=org.apache.catalina.realm.JDBCRealm debug=99 connectionName=website connectionPassword=user driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://linuxsvr.hfea.gov.uk/dba userTable=user userNameCol=User userCredCol=Password/ In my .jsp page the extract where the exception occurs is : String MM_centres_web_database_DRIVER = org.gjt.mm.mysql.Driver; String MM_centres_web_database_USERNAME = website; String MM_centres_web_database_PASSWORD = user; String MM_centres_web_database_STRING = jdbc:mysql://linuxsvr.hfea.gov.uk/dba; // end // HTML // begin [file=/Connections/centres_web_database.jsp;from=(10,2);to=(14,2)] out.write(\r\n\r\n\r\n\r\n ); // end // HTML // begin [file=/ivf_clinic_search.jsp;from=(2,58);to=(3,0)] out.write(\r\n); // end // begin [file=/ivf_clinic_search.jsp;from=(3,2);to=(12,0)] Driver DriverRecordset1 = (Driver)Class.forName(MM_centres_web_database_DRIVER).newInstance(); Connection ConnRecordset1 = DriverManager.getConnection(MM_centres_web_database_STRING,MM_centres_web_d atabase_USERNAME,MM_centres_web_database_PASSWORD); PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement(SELECT * FROM DBA.region_pg); ResultSet Recordset1 = StatementRecordset1.executeQuery(); boolean Recordset1_isEmpty = !Recordset1.next(); boolean Recordset1_hasData = !Recordset1_isEmpty; Object Recordset1_data; int Recordset1_numRows = 0; // end I have completely run out of ideas as to why this exception is occuring, I would be very grateful for any suggestions as my manager is breathing down my neck! Thanks again, Paul Nokia Game is on again. Go to http://uk.yahoo.com/nokiagame/ and join the new all media adventure before November 3rd.
Re: URGENT, Tomcat MySQL problems
It has been a common practice that we do not put the application-specific JARs under the lib in the JRE context. Rather we place them under the application specific lib. So, I agreee with that. However, nobody is stopping you doing that and should not have technical problem. Do we? Pae I'm not a MySQL user, but I really don't think you should EVER put anything directly in the JRE directory. It should go either in your Tomcat lib or better yet (if application specific) in your WEB-INF/lib directory. -Original Message- From: Paul Davies [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 11:57 AM To: [EMAIL PROTECTED] Subject: URGENT, Tomcat MySQL problems Hi guys, I am getting the following error: javax.servlet.ServletException: No suitable driver at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm p l.java:457) at org.apache.jsp.ivf_0005fclinic_0005fsearch$jsp._jspService(ivf_0005fclinic_ 0 005fsearch$jsp.java:145) .. and I believe that I have the driver installed in the correct place. I am running Tomcat 4.0 with MySQL 3.23.43 with Redhat Linux 7.1. I placed the 'mm.mysql-2.0.4-bin.jar' file in /usr/java/jdk1.3.1/jre/lib/ext directory (as instructed by some solutions in the mailing list) but the driver still will not work. In my 'server.xml' file I have the following Realm defined : Realm className=org.apache.catalina.realm.JDBCRealm debug=99 connectionName=website connectionPassword=user driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://linuxsvr.hfea.gov.uk/dba userTable=user userNameCol=User userCredCol=Password/ In my .jsp page the extract where the exception occurs is : String MM_centres_web_database_DRIVER = org.gjt.mm.mysql.Driver; String MM_centres_web_database_USERNAME = website; String MM_centres_web_database_PASSWORD = user; String MM_centres_web_database_STRING = jdbc:mysql://linuxsvr.hfea.gov.uk/dba; // end // HTML // begin [file=/Connections/centres_web_database.jsp;from=(10,2);to=(14,2)] out.write(\r\n\r\n\r\n\r\n ); // end // HTML // begin [file=/ivf_clinic_search.jsp;from=(2,58);to=(3,0)] out.write(\r\n); // end // begin [file=/ivf_clinic_search.jsp;from=(3,2);to=(12,0)] Driver DriverRecordset1 = (Driver)Class.forName(MM_centres_web_database_DRIVER).newInstance(); Connection ConnRecordset1 = DriverManager.getConnection(MM_centres_web_database_STRING,MM_centres_web_d a tabase_USERNAME,MM_centres_web_database_PASSWORD); PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement(SELECT * FROM DBA.region_pg); ResultSet Recordset1 = StatementRecordset1.executeQuery(); boolean Recordset1_isEmpty = !Recordset1.next(); boolean Recordset1_hasData = !Recordset1_isEmpty; Object Recordset1_data; int Recordset1_numRows = 0; // end I have completely run out of ideas as to why this exception is occuring, I would be very grateful for any suggestions as my manager is breathing down my neck! Thanks again, Paul Nokia Game is on again. Go to http://uk.yahoo.com/nokiagame/ and join the new all media adventure before November 3rd.