Skip to main content

Seeing ClassNotFoundException: com.mysql.jdbc.Driver when installing/upgrading SCH on-prem.


AkshayJadhav
StreamSets Employee
Forum|alt.badge.img

When doing an installation for the first time or an upgrade in an SCH environment and we execute the script dev/01-initdb.sh, it fails with the below exception:

# dev/01-initdb.sh
++ pwd
+ DPM_DIST=/opt/streamsets-dpm
+ /opt/streamsets-dpm/bin/streamsets dpmcli security buildSchema --auto --debug
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/streamsets-dpm/app-lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/streamsets-dpm/server-lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
The configuration property named "openjpa.DBDictionary" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.jdbc.DBDictionary".
Error while running 'BuildSchemaCommand': java.lang.Exception: Error looking up 'APPLICATION_INFO' table: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
----------------------------------------
java.lang.Exception: Error looking up 'APPLICATION_INFO' table: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at com.streamsets.lib.util.DbUtils.systemTableExists(DbUtils.java:37)
at com.streamsets.lib.cli.BaseBuildSchemaCommand.preCreateOrUpgradeSchema(BaseBuildSchemaCommand.java:131)
at com.streamsets.lib.cli.BaseBuildSchemaCommand.runCommand(BaseBuildSchemaCommand.java:97)
at com.streamsets.lib.cli.BaseCommand.run(BaseCommand.java:38)
at com.streamsets.apps.security.cli.SecurityCommand.main(SecurityCommand.java:26)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Reason:

The reason for this exception is that in the shell script we are trying to connect to the SCH backend database and for that, we need the required JDBC driver. The JDBC driver for our database needs to be available under $DPM_HOME/extra-lib. 

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply