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

Reply via email to