I have created a sample DB using mysql workbench and I am wanting now to reverse engineer that database structure into java JPA classes using the g9 plugin in Spring Tool Suite, which is available in eclipse marketplace. I get to the very end of the process where I am able to fetch the tables from the schema I created, and it seems like the import is going to happen, but then when I click on "finish" it says,
error when reading dbms model com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet successfully received from the server was 71 milliseconds ago. The last packet sent successfully to the server was 74 milliseconds ago.
I know that there are other stackoverflow posts that could generally be said to fall into the same category as what I am asking, but this is dealing specifically with G9, and is a bit different. Here is what I have tried thus far.
- Verify that the application properties is setup correctly with the right connector. As suggested in another post, I've got the following dependency added to the pom, which passes mvn build/install and is fetching the DB tables.
mysql mysql-connector-java runtime
Verified that options file in mysql workbench has adequate time set before closing connection, has correct IP address, port, pass and username for DB schema, and that this correlates with application properties. Here is some of what I have thus far in application properties for the datasource configuration.
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://localhost:3306/db&autoReconnect=true&failOverReadOnly=false&maxReconnects=10&useUnicode=true&characterEncoding=UTF8&allowMultiQueries=true&useSSL=false&serverTimezone=MST
I checked that the permissions are set correctly in mysql workbench.
Verified I am using a newer connector in STS (e.g., mysql-connector-java-8.0.12.jar).
I have tried to change the driver class from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver, because I read other posts about this.
Any insight as to what I am missing would be appreciated.