dcsimg
Problem with JNDI MySQL Datasource on Tomcat 4.0.3 (Linux)- "No suitable driver"
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Akos_Kiszely
Posted On:   Monday, October 27, 2003 06:19 AM

I have a web application which uses a JNDI DataSource under Tomcat 4.0.3. The application works fine under Windows, but if i install it under Linux i receive an error message ("No suitable driver"). I copied mysql-connector-java-3.0.8-stable-bin.jar to $catalina_home/common/lib. I turned off the security manager. After the tomcat started, the JNDI DataSource not working, JSTL database tags not working, but the mysql-connector is working fine, when i trying to connect in a jsp. A part from my server.xml: -------- path="/kortarsgrafika" reloadable="true"> type="javax.sql.DataSou   More>>

I have a web application which uses a JNDI DataSource under Tomcat 4.0.3. The application works fine under Windows, but if i install it under Linux i receive an error message ("No suitable driver").



I copied mysql-connector-java-3.0.8-stable-bin.jar to $catalina_home/common/lib.



I turned off the security manager.



After the tomcat started, the JNDI DataSource not working,
JSTL database tags not working, but the mysql-connector is working fine, when i trying to connect in a jsp.



A part from my server.xml:

--------


path="/kortarsgrafika" reloadable="true">



type="javax.sql.DataSource" debug="5"/>





user

*******





password

******





driverClassName


com.mysql.jdbc.Driver





driverName

jdbc:mysql://localhost/kortars:3306?
useUnicode=true&characterEncoding=ISO-8859-2







------





My environment variables:



java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition

sun.boot.library.path : /usr/local/j2sdk1.4.1_02/jre/lib/i386

java.vm.version : 1.4.1_02-b06

java.vm.vendor : Sun Microsystems Inc.

java.vendor.url : http://java.sun.com/

path.separator : :

java.vm.name : Java HotSpot(TM) Server VM

file.encoding.pkg : sun.io

user.country : US

sun.os.patch.level : unknown

java.vm.specification.name : Java Virtual Machine Specification
user.dir : /

java.runtime.version : 1.4.1_02-b06

java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment

java.endorsed.dirs : /usr/share/tomcat4/bin:/usr/share/tomcat4/common/lib

os.arch : i386

java.io.tmpdir : /usr/share/tomcat4/temp

line.separator :

java.vm.specification.vendor : Sun Microsystems Inc.

java.naming.factory.url.pkgs : org.apache.naming

os.name : Linux

sun.java2d.fontpath :

java.library.path : /usr/local/j2sdk1.4.1_02/jre/lib/i386/server:/usr/local/j2sdk1.4.1_02/jre/lib/i386:/usr/local/j2sdk1.4.1_02/jre/../lib/i386

java.specification.name : Java Platform API Specification

java.class.version : 48.0

java.util.prefs.PreferencesFactory :
java.util.prefs.FileSystemPreferencesFactory
os.version : 2.2.21
user.home : /usr/share/tomcat4

user.timezone : Europe/Budapest

catalina.useNaming : true

java.awt.printerjob : sun.print.PSPrinterJob

file.encoding : ANSI_X3.4-1968

java.specification.version : 1.4

catalina.home : /usr/share/tomcat4

user.name : tomcat4

java.class.path : /usr/local/j2sdk1.4.1_02/lib/tools.jar:/usr/share/tomcat4/bin/bootstrap.jar

java.naming.factory.initial : org.apache.naming.java.javaURLContextFactory

java.vm.specification.version : 1.0

sun.arch.data.model : 32

java.home : /usr/local/j2sdk1.4.1_02/jre

java.specification.vendor : Sun Microsystems Inc.

user.language : en

java.vm.info : mixed mode

java.version : 1.4.1_02

java.ext.dirs : /usr/local/j2sdk1.4.1_02/jre/lib/ext

sun.boot.class.path : /usr/share/tomcat4/bin/bootstrap.jar:/usr/share/tomcat4/common/lib/tyrex-0.9.7.0.jar:/usr/share/tomcat4/common/lib/naming-resources.jar:/usr/share/tomcat4/common/lib/naming-common.jar:/usr/share/tomcat4/common/lib/xmlParserAPIs.jar:/usr/share/tomcat4/common/lib/xercesImpl.jar:/usr/share/tomcat4/common/lib/servlet.jar:/usr/share/tomcat4/common/lib/mysql-connector-java-3.0.8-stable-bin.jar:/usr/share/tomcat4/common/lib/jndi.jar:/usr/share/tomcat4/common/lib/jta-spec1_0_1.jar:/usr/share/tomcat4/common/lib/mail.jar:/usr/local/j2sdk1.4.1_02/jre/lib/rt.jar:/usr/local/j2sdk1.4.1_02/jre/lib/i18n.jar:/usr/local/j2sdk1.4.1_02/jre/lib/sunrsasign.jar:/usr/local/j2sdk1.4.1_02/jre/lib/jsse.jar:/usr/local/j2sdk1.4.1_02/jre/lib/jce.jar:/usr/local/j2sdk1.4.1_02/jre/lib/charsets.jar:/usr/local/j2sdk1.4.1_02/jre/classes

java.vendor : Sun Microsystems Inc.

catalina.base : /usr/share/tomcat4

file.separator : /

java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi

mail.smtp.host : localhost

sun.cpu.endian : little

sun.io.unicode.encoding : UnicodeLittle

sun.cpu.isalist :





What is the problem with this configuration under Linux ? :-(



Please help me :-)

   <<Less

Re: Problem with JNDI MySQL Datasource on Tomcat 4.0.3 (Linux)- "No suitable driver"

Posted By:   Denis_Morozov  
Posted On:   Monday, November 3, 2003 01:45 AM

Hi !


Try removing the mysql-connector-java-3.0.8-stable-bin.jar from your webapps//WEB-INF/lib directory and leaving it only in $catalina_home/common/lib.


I had the similar situation and this solution helped in my case.

Re: Problem with JNDI MySQL Datasource on Tomcat 4.0.3 (Linux)- "No suitable driver"

Posted By:   AlessandroA_Garbagnati  
Posted On:   Thursday, October 30, 2003 10:41 PM

Hi,

The configuration seems ok. Unfortunately I have never tried that type of configuration with that old version of Tomcat. I have recently set up a similar situation using the latest 4.1.x version of the Servlet Container, following the documentation located at the JNDI DataSource HOW-TO and it did work.


Maybe I can suggest you to move to a newest stable (4.1) version.

About | Sitemap | Contact