Actions
bug #9615
openOptions for schema creation in empty data bases.
Start date:
Due date:
% Done:
0%
Estimated time:
Severity:
normal
Found in Version:
Description
stack trace from cdmlib-remote-webapp startup:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is eu.etaxonomy.cdm.database.CdmDatabaseException: Case type (camel, upper, lower) of the database could be defined. Maybe the CdmMetaData table is missing in the datasource at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 53 more Caused by: eu.etaxonomy.cdm.database.CdmDatabaseException: Case type (camel, upper, lower) of the database could be defined. Maybe the CdmMetaData table is missing in the datasource at eu.etaxonomy.cdm.database.update.CaseType.caseTypeOfDatasource(CaseType.java:71) at eu.etaxonomy.cdm.database.update.CdmUpdater.updateToCurrentVersion(CdmUpdater.java:81) at eu.etaxonomy.cdm.opt.config.DataSourceConfigurer.dataSource(DataSourceConfigurer.java:271) at eu.etaxonomy.cdm.opt.config.DataSourceConfigurer$$EnhancerBySpringCGLIB$$a474cd6a.CGLIB$dataSource$5(<generated>) at eu.etaxonomy.cdm.opt.config.DataSourceConfigurer$$EnhancerBySpringCGLIB$$a474cd6a$$FastClassBySpringCGLIB$$a97e612b.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) at eu.etaxonomy.cdm.opt.config.DataSourceConfigurer$$EnhancerBySpringCGLIB$$a474cd6a.dataSource(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 54 more Caused by: java.sql.SQLSyntaxErrorException: Table 'cdm_tmp.cdmmetadata' doesn't exist at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:353) at eu.etaxonomy.cdm.database.WrappedCdmDataSource.executeQuery(WrappedCdmDataSource.java:354) at eu.etaxonomy.cdm.database.update.CaseType.caseTypeOfDatasource(CaseType.java:69) ... 66 more
We need three things:
- Document this option in the setup guides (redmine wiki and cybertaxonomy.org site)
- Implement option to create the schema from the cdm-server management console - needed for manual setup by humans
- Implement option to create the schema from the command line - needed for automatic setup e.g. in docker environments for workshops etc.
NOTEs
- The management console should check is the database is empty, that is if there is only the
_c3p0ConnectionTest
table - The
CaseType.caseTypeOfDatasource()
should perform some more checks in case of "Table 'cdm_tmp.cdmmetadata' doesn't exist" and report an supposibly empty uninitialized cdm-db with a special Exception which is subclass ofCdmDatabaseException
==> create cdmlib ticket #.... - how will this work in multitenency situations?
Files
Updated by Andreas Müller almost 3 years ago
- File picture914-1.png picture914-1.png added
- Status changed from New to Feedback
- Assignee changed from Andreas Müller to Andreas Kohlbecker
The required functionality exists in the taxeditor:
therefore I suggest to close this ticket as worksforme.
Definetely it is not a but, but if we also want to have the functionality in the CDM Server we may change this ticket to a feature request for CdmServer (if such a ticket does not exist yet).
Updated by Andreas Kohlbecker almost 3 years ago
- Subject changed from cdmlib fails creating a new database to Opttions for schema creation in empty data bases.
- Description updated (diff)
- Category changed from cdmlib to cdmserver
- Status changed from Feedback to New
- Target version changed from Unassigned CDM tickets to Release 5.45
Thank you for this hint. The cdmlib-remote will create the schema creation when the parameter cdm.forceSchemaCreate
is set to true
.
We need three things:
- Document this option in the setup guides (redmine wiki and cybertaxonomy.org site)
- Implement option to create the schema from the cdm-server management console - needed for manual setup by humans
- Implement option to create the schema from the command line - needed for automatic setup e.g. in docker environments for workshops etc.
I am changing the subject and description of this ticket accordingly
Updated by Andreas Kohlbecker almost 3 years ago
- Priority changed from New to Highest
Updated by Andreas Müller about 2 years ago
- Subject changed from Opttions for schema creation in empty data bases. to Options for schema creation in empty data bases.
Actions