How can connect mysql to spring roo?

827 Views Asked by At

Spring-roo can't be connect to MySQL when i execute command database reverse engineer --schema test --package then it give error:

Could not initialize class com.mysql.jdbc.Connection...

Image of error:

enter image description here

1

There are 1 best solutions below

0
On

You need 2 things:

  1. Configure connection info in project in src/main/resources/META-INF/spring/database.properties file. Spring Roo uses it to connect DB.
  2. Make JDBC driver accessible by Spring Roo installing it in OSGi environ ( see manual section about it )

Good luck!