Symptoms
Tomcat applications fail to start with the following error:
WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For complian
ce with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection
Description
Your connection string does not have ?useSSL=false
spring.datasource.url=jdbc:mysql://localhost/tcattest
spring.datasource.username=tcattest spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Workaround
Modify your Tomcat Application MySQL connection string to add ?useSSL=false. For example:
spring.datasource.url=jdbc:mysql://localhost/tcattest?useSSL=false
spring.datasource.username=tcattest spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
For additional assistance debugging your Tomcat application, you should reach out to your Developer or System Administrator.