Though, I am not sure, if this is related to the import of csv data for the “Titanic”-project, I do get this error in /var/log/opal/stdout.log
:
2022-04-04 12:10:41,351 ERROR org.obiba.opal.core.service.ProjectsServiceImpl - Loading datasource of project omics failed for database: opal_storage
org.obiba.magma.MagmaRuntimeException: org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]; nested exception is java.sql.SQLException: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at org.obiba.magma.support.Initialisables.initialise(Initialisables.java:28)
at org.obiba.magma.DefaultDatasourceRegistry.addDatasource(DefaultDatasourceRegistry.java:99)
at org.obiba.magma.DefaultDatasourceRegistry.addDatasource(DefaultDatasourceRegistry.java:123)
at org.obiba.magma.security.SecuredDatasourceRegistry.addDatasource(SecuredDatasourceRegistry.java:49)
at org.obiba.magma.MagmaEngine.addDatasource(MagmaEngine.java:146)
at org.obiba.opal.core.service.ProjectsServiceImpl.lambda$registerDatasource$0(ProjectsServiceImpl.java:279)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.obiba.opal.core.service.ProjectsServiceImpl.registerDatasource(ProjectsServiceImpl.java:263)
at org.obiba.opal.core.service.ProjectsServiceImpl$DatasourceLoader.load(ProjectsServiceImpl.java:388)
at org.obiba.opal.core.service.ProjectsServiceImpl$DatasourceLoader.run(ProjectsServiceImpl.java:378)
Caused by: org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]; nested exception is java.sql.SQLException: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:90)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:359)
at org.obiba.magma.datasource.jdbc.JdbcDatasource.doWithDatabase(JdbcDatasource.java:508)
at org.obiba.magma.datasource.jdbc.JdbcDatasource.createMetadataTablesIfNotPresent(JdbcDatasource.java:552)
at org.obiba.magma.datasource.jdbc.JdbcDatasource.onInitialise(JdbcDatasource.java:237)
at org.obiba.magma.support.AbstractDatasource.initialise(AbstractDatasource.java:101)
at org.obiba.magma.support.AbstractDatasourceWrapper.initialise(AbstractDatasourceWrapper.java:52)
at org.obiba.magma.views.ViewAwareDatasource.initialise(ViewAwareDatasource.java:55)
at org.obiba.magma.support.Initialisables.initialise(Initialisables.java:24)
... 9 common frames omitted
Caused by: java.sql.SQLException: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at org.obiba.magma.datasource.jdbc.JdbcDatasource$3.doInConnection(JdbcDatasource.java:519)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:352)
... 16 common frames omitted
Caused by: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
at org.obiba.magma.datasource.jdbc.JdbcDatasource$ChangeDatabaseCallback.doInDatabase(JdbcDatasource.java:685)
at org.obiba.magma.datasource.jdbc.JdbcDatasource$3.doInConnection(JdbcDatasource.java:517)
... 17 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: (conn=39) Specified key was too long; max key length is 3072 bytes
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:177)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:110)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:228)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:334)
at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:386)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
... 22 common frames omitted
Caused by: java.sql.SQLException: Specified key was too long; max key length is 3072 bytes
Query is: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))
at org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:119)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:200)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:328)
... 26 common frames omitted
2022-04-04 12:10:41,860 ERROR org.obiba.opal.core.service.ProjectsServiceImpl - Loading datasource of project TITANIC_NEWCOMERS_WORKSHOP failed for database: opal_storage
org.obiba.magma.MagmaRuntimeException: org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]; nested exception is java.sql.SQLException: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at org.obiba.magma.support.Initialisables.initialise(Initialisables.java:28)
at org.obiba.magma.DefaultDatasourceRegistry.addDatasource(DefaultDatasourceRegistry.java:99)
at org.obiba.magma.DefaultDatasourceRegistry.addDatasource(DefaultDatasourceRegistry.java:123)
at org.obiba.magma.security.SecuredDatasourceRegistry.addDatasource(SecuredDatasourceRegistry.java:49)
at org.obiba.magma.MagmaEngine.addDatasource(MagmaEngine.java:146)
at org.obiba.opal.core.service.ProjectsServiceImpl.lambda$registerDatasource$0(ProjectsServiceImpl.java:279)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.obiba.opal.core.service.ProjectsServiceImpl.registerDatasource(ProjectsServiceImpl.java:263)
at org.obiba.opal.core.service.ProjectsServiceImpl$DatasourceLoader.load(ProjectsServiceImpl.java:388)
at org.obiba.opal.core.service.ProjectsServiceImpl$DatasourceLoader.run(ProjectsServiceImpl.java:378)
Caused by: org.springframework.jdbc.UncategorizedSQLException: ConnectionCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]; nested exception is java.sql.SQLException: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:90)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:359)
at org.obiba.magma.datasource.jdbc.JdbcDatasource.doWithDatabase(JdbcDatasource.java:508)
at org.obiba.magma.datasource.jdbc.JdbcDatasource.createMetadataTablesIfNotPresent(JdbcDatasource.java:552)
at org.obiba.magma.datasource.jdbc.JdbcDatasource.onInitialise(JdbcDatasource.java:237)
at org.obiba.magma.support.AbstractDatasource.initialise(AbstractDatasource.java:101)
at org.obiba.magma.support.AbstractDatasourceWrapper.initialise(AbstractDatasourceWrapper.java:52)
at org.obiba.magma.views.ViewAwareDatasource.initialise(ViewAwareDatasource.java:55)
at org.obiba.magma.support.Initialisables.initialise(Initialisables.java:24)
... 9 common frames omitted
Caused by: java.sql.SQLException: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at org.obiba.magma.datasource.jdbc.JdbcDatasource$3.doInConnection(JdbcDatasource.java:519)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:352)
... 16 common frames omitted
Caused by: liquibase.exception.DatabaseException: (conn=39) Specified key was too long; max key length is 3072 bytes [Failed SQL: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:356)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:57)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:125)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1229)
at org.obiba.magma.datasource.jdbc.JdbcDatasource$ChangeDatabaseCallback.doInDatabase(JdbcDatasource.java:685)
at org.obiba.magma.datasource.jdbc.JdbcDatasource$3.doInConnection(JdbcDatasource.java:517)
... 17 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: (conn=39) Specified key was too long; max key length is 3072 bytes
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:177)
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:110)
at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:228)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:334)
at org.mariadb.jdbc.MariaDbStatement.execute(MariaDbStatement.java:386)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:352)
... 22 common frames omitted
Caused by: java.sql.SQLException: Specified key was too long; max key length is 3072 bytes
Query is: CREATE TABLE `opal_storage`.`categories` (`datasource` VARCHAR(255) NOT NULL, `value_table` VARCHAR(255) NOT NULL, `variable` VARCHAR(255) NOT NULL, `name` VARCHAR(255) NOT NULL, `missing` BIT(1) NOT NULL, CONSTRAINT `PK_CATEGORIES` PRIMARY KEY (`datasource`, `value_table`, `variable`, `name`))
at org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:119)
at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:200)
at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:328)
... 26 common frames omitted
Opal Server successfully started.
Opal is attached to this console. Press ctrl-c to stop.
This seems to exceed the allowed key length of the column defintion when trying to write to the database, but with regard to the “Omics” package.