tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Kimelman <crhistopher.p...@gmail.com>
Subject Re: tomcat can't find suitable driver for mysql
Date Mon, 13 Jul 2020 20:30:27 GMT
An update :

I have now installed the same JAR file under tomcat that I used from the
command line
-rwxr-xr-x 1 root root 1007502 Jul 13 15:25
/opt/tomcat/latest/lib/mysql-connector-java-5.1.47.jar

However the same error still occurs.

On Mon, Jul 13, 2020 at 3:21 PM Barry Kimelman <crhistopher.pike@gmail.com>
wrote:

> 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
>


-- 

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

Barry Kimelman
Winnipeg, Manitoba, Canada

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