Running database MySQL 8.0.27-cll-lve with Tomcat 8.5.70 using connector mysql-connector-java-5.1.23-bin.jar

Operating System & Version
CloudLinux v8.5.0
cPanel & WHM Version
v100.0.5

Amr Samy

Registered
Jan 15, 2022
1
0
1
Egypt
cPanel Access Level
DataCenter Provider
Hello ,
I have website under domain : https://eg-sa.com/ was running on cpanel with MySQL 5.1.23 . After upgrading CPanel and MySQL to 8.0.27-cll-lve the website not connecting with database it gives :
  • DriverManagerException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
  • java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/egsajava_egsa?useUnicode=yes&characterEncoding=UTF-8
. After troublshooting and trying lot of solution i got this :
1- the issue of: bash: java: command not found , has been fixed after run the following commands:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64
echo $JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin
echo $PATH

  • testing by run:
    java -version
  • the output is:
    openjdk version "1.8.0_312"
    OpenJDK Runtime Environment (build 1.8.0_312-b07)
    OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
2- when I restart tomcat using:
ubic restart ea-tomcat85
ubic status ea-tomcat85

  • it gave error:
    Restarting ea-tomcat85... Configuration error
    java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.el8_5.x86_64/jre/lib/logging.properties (Nosuch file or directory)
3- the website https://eg-sa.com/ can not loaded and gave: 503 Service Unavailable
 

Attachments

Last edited by a moderator:

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,045
111
118
Houston, TX
cPanel Access Level
Root Administrator
Hello! Researching this error I found the following article from StackOverflow.


This indicates your application may need additional classpath configurations. This may require installation of the jdbc driver for your server, but may also require modifications to your application code. I would suggest reaching out to a developer; it's likely your site isn't compatible with the newer version of MySQL.