Question

unable to install schema on Control Hub

  • 16 December 2021
  • 3 replies
  • 114 views

I am installing Control Hub and when I run 01-iitdb.sh, I get error of DbUtils.DBType.POSTGRES

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]

Error while running 'BuildSchemaCommand': java.lang.IllegalArgumentException: No                       enum constant com.streamsets.lib.util.DbUtils.DBType.POSTGRES

----------------------------------------
java.lang.IllegalArgumentException: No enum constant com.streamsets.lib.util.DbU                      tils.DBType.POSTGRES
        at java.lang.Enum.valueOf(Enum.java:238)
        at com.streamsets.lib.util.DbUtils$DBType.valueOf(DbUtils.java:180)
        at com.streamsets.lib.util.DbUtils.getDbTypeFromJdbcUrl(DbUtils.java:177                      )
        at com.streamsets.lib.jpa.JpaExecutor.getJpaConfiguration(JpaExecutor.ja                      va:367)
        at com.streamsets.lib.jpa.JpaExecutor.<init>(JpaExecutor.java:380)
        at com.streamsets.lib.jpa.JpaExecutorFactory.<init>(JpaExecutorFactory.j                      ava:53)
        at com.streamsets.lib.jpa.JpaExecutorFactory.create(JpaExecutorFactory.j                      ava:23)
        at com.streamsets.lib.cli.BaseAppSchemaValidationCommand.getJpaExecutorF                      actory(BaseAppSchemaValidationCommand.java:75)
        at com.streamsets.lib.cli.BaseBuildSchemaCommand.getJpaFactory(BaseBuild                      SchemaCommand.java:320)
        at com.streamsets.lib.cli.BaseBuildSchemaCommand.runCommand(BaseBuildSch                      emaCommand.java:73)
        at com.streamsets.lib.cli.BaseCommand.run(BaseCommand.java:38)
        at com.streamsets.apps.security.cli.SecurityCommand.main(SecurityCommand                      .java:28)
----------------------------------------
 

where is the calling creation script come from?  I can’t debug this error.  How can I resolve this issue?

thank you.

vr,

Bach-Nga

 


3 replies

Userlevel 5
Badge

Hi @maytim00,

This category is for members to add articles that have written about their usage, etc. I have moved your question to the Platform Q&A - Got a Question? category. Someone will be of help shortly. Thanks! 

 

-@Drew Kreiger 

thank you.  I found some schemas created for jobrunner, security, message, pipelinestore and stopped the rest with the datatype error.  I wonder why there are scripts  of database creation for mysql, maria, and postgresql but where are the script to create schemas??  The documents are not pretty clear when create control hub in tarball and/or rpm.  Also, why the table names and some attributes are with 2 underscore?  This is not a standard way to create database, tablename and/or attributes.   I see the schemas created for those working databases (mention as above), all tables granted to public schema while the mysql granted to itself because schema in mysql is database_name.  In postgresql, schema is schema and database name is database_name unless create the schema name as same as database name.  

This is 01-initdb.sh is confused to debug and don’t understand why needed to pull the source code to create schemas from url, “.com…...” something.

Does the code have a bug and what is the old version to create the schema for the latest version of Control Hub?  Or it’s only worked for MySQL/Maria not PostgreSQL? 

I don’t need the whole scripts but only the better schema creation scripts to install the schema/tables.  Would someone from streamsets please give me a better version of schema creation script?

 

Bach-Nga

I rebuilt streamsets control hub and still get error to create schema.  The 01-initdb.sh loading get this error but i don't know how to fix it.

# dev/01-initdb.sh
++ pwd
+ DPM_DIST=/opt/streamsets-dpm
+ echo /opt/streamsets-dpm
/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/slf4             j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/streamsets-dpm/server-lib/slf4j-log4j12-1.7.7.jar!/org/s             lf4j/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_IN             FO' table: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

----------------------------------------
java.lang.Exception: Error looking up 'APPLICATION_INFO' table: java.lang.ClassNotFoundExceptio             n: com.mysql.jdbc.Driver
        at com.streamsets.lib.util.DbUtils.systemTableExists(DbUtils.java:42)
        at com.streamsets.lib.cli.BaseBuildSchemaCommand.preCreateOrUpgradeSchema(BaseBuildSche             maCommand.java:139)
        at com.streamsets.lib.cli.BaseBuildSchemaCommand.runCommand(BaseBuildSchemaCommand.java             :82)
        at com.streamsets.lib.cli.BaseCommand.run(BaseCommand.java:38)
        at com.streamsets.apps.security.cli.SecurityCommand.main(SecurityCommand.java:28)
Caused by: java.lang.ClassNotFoundException: com.mysql.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:264)
        at com.streamsets.lib.util.DbUtils.createConnection(DbUtils.java:133)
        at com.streamsets.lib.util.DbUtils.systemTableExists(DbUtils.java:35)
        ... 4 more
----------------------------------------

 

I am using java8

This question posted too long and streamsets team couldn’t resolve the problem?

Many thanks for leading the way how to get the control hub installation.

 

Bach-Nga

Reply