tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Kimelman <crhistopher.p...@gmail.com>
Subject tomcat can't find suitable driver for mysql
Date Mon, 13 Jul 2020 20:21:59 GMT
my system is ubuntu 20.04
I am running tomcat 9.0.37
I can run java based mysql programs from the terminal command line with no
problems

I have installed tomcat under /opt/tomcat/latest
under /opt/tomcat/latest/lib I have installed the jar file for mysql

-rw-r--r-- 1 root root 1007505 Jul 13 10:54
/opt/tomcat/latest/lib/mysql-connector-java-5.1.47-bin.jar

In my build.xml I have the following lines

131   <property name="catalina.home" value="/opt/tomcat/latest"/>

186     <!-- Include all elements that Tomcat exposes to applications -->
187     <fileset dir="${catalina.home}/bin">
188       <include name="*.jar"/>
189     </fileset>
190     <pathelement location="${catalina.home}/lib"/>
191     <fileset dir="${catalina.home}/lib">
192       <include name="*.jar"/>
193     </fileset>

However after I compile and install the application, when I try to run it
my application traps the following error

java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost/qwlc?autoReconnect=true&useSSL=false

What am I missing ? Why can't my tomcat app find the mysql class ?



==================

Barry Kimelman
Winnipeg, Manitoba, Canada

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message