Support Questions

Find answers, ask questions, and share your expertise

Not able to install CDP 7.1.3, getting 'Exception in thread "main" org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver: com.mysql.cj.jdbc.Driver => Check whether the jar file is present' error in installation wizard

avatar
Contributor

Hello,

 

I'm want to install CDP-7.1.3. I have configured everything as per the official documentation (https://docs.cloudera.com/cdp-private-cloud-base/7.1.3/installation/topics/cdpdc-configure-repositor...), but in installation wizard it giving following error for 'schemaregistry' service or role installation. 

 

+ exec /var/run/cloudera-scm-agent/process/68-schemaregistry-SCHEMA_REGISTRY_SERVER/scripts/control.sh
Exception in thread "main" org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver: com.mysql.cj.jdbc.Driver => Check whether the jar file is present
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.<init>(DriverDataSource.java:142)
at org.flywaydb.core.api.configuration.ClassicConfiguration.setDataSource(ClassicConfiguration.java:1147)
at org.flywaydb.core.Flyway.setDataSource(Flyway.java:712)
at com.hortonworks.registries.storage.tool.sql.SchemaFlywayFactory.mysqlFlyway(SchemaFlywayFactory.java:58)
at com.hortonworks.registries.storage.tool.sql.SchemaFlywayFactory.get(SchemaFlywayFactory.java:44)
at com.hortonworks.registries.storage.tool.sql.TablesInitializer.main(TablesInitializer.java:176)
Caused by: org.flywaydb.core.api.FlywayException: Unable to instantiate class com.mysql.cj.jdbc.Driver : com.mysql.cj.jdbc.Driver
at org.flywaydb.core.internal.util.ClassUtils.instantiate(ClassUtils.java:61)
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.<init>(DriverDataSource.java:132)
... 5 more
Caused by: java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.flywaydb.core.internal.util.ClassUtils.instantiate(ClassUtils.java:59)
... 6 more

 

I have installed MySQL and MySQL connector driver by following official documentation. Database connection is successful at time of 'Database configuration step'.

 

Can anyone please help me in this issue?

 

Thanks.

3 REPLIES 3

avatar
Super Guru

@dmharshit ,

 

Did you execute these instructions? https://docs.cloudera.com/cdp-private-cloud-base/7.1.3/installation/topics/cdpdc-install-config-post...

 

Cheers,

André

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Contributor

Hi @araujo ,

 

I'm using MySQL as Database, I have installed mysql-connector-java also tried copying jar in '/usr/share/java/mysql-connector-java.jar', still same issue persist. 

 

Thanks

avatar
Super Guru

@dmharshit ,

 

Could you please share the output of this command?

namei -l /usr/share/java/mysql-connector-java.jar

 

Cheers,

André

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.