j-lawyer.org database migrations schlagen fehl nach Update


Startseite Foren Hilfe bei Problemen j-lawyer.org database migrations schlagen fehl nach Update

6 Beiträge anzeigen - 1 bis 6 (von insgesamt 6)
  • Autor
    Beiträge
  • #4917
    Markus
    Teilnehmer

    Ich habe auf meinem Linuxserver das Update auf Version 2.1 vollzogen und konnte mich danach nicht mehr anmelden. Das Update lief fehlerfrei durch. Auszug aus dem Server log:

    2022-04-19 08:52:57,956 INFO [stdout] (ServerService Thread Pool — 112) Starting j-lawyer.org database migrations…
    2022-04-19 08:52:57,958 INFO [org.flywaydb.core.internal.database.DatabaseFactory] (ServerService Thread Pool — 112) Database: jdbc:mysql://localhost>2022-04-19 08:52:58,062 ERROR [org.jlawyer.persistence.DatabaseMigrator] (ServerService Thread Pool — 112) exception caught: org.flywaydb.core.api.Fly> at org.flywaydb.core.Flyway.doValidate(Flyway.java:1467)
    at org.flywaydb.core.Flyway.access$100(Flyway.java:82)
    at org.flywaydb.core.Flyway$1.execute(Flyway.java:1349)
    at org.flywaydb.core.Flyway$1.execute(Flyway.java:1341)
    at org.flywaydb.core.Flyway.execute(Flyway.java:1696)
    at org.flywaydb.core.Flyway.migrate(Flyway.java:1341)
    at org.jlawyer.persistence.DatabaseMigrator.integrate(DatabaseMigrator.java:732)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:276)
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:467)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:939)
    at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:170)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:128)
    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:649)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:212)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:485)
    2022-04-19 08:52:59,442 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool — 111) SQL Error: 1356, SQLState: HY000
    2022-04-19 08:52:59,442 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool — 111) View ‚jlawyerdb.AppUserBean‘ refere>2022-04-19 08:52:59,445 INFO [org.hibernate.orm.beans] (ServerService Thread Pool — 111) HHH10005004: Stopping BeanContainer : org.hibernate.resource>2022-04-19 08:52:59,445 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool — 111) MSC000001: Failed to start service jboss.persistenceunit.> at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:198)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:128)
    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:649)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:212)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:485)
    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: j-lawyer-server-ejbPU] Unable to build Hibernate SessionFactory
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1016)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:942)
    at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:170)
    … 9 more
    Caused by: org.hibernate.exception.GenericJDBCException: Error accessing tables metadata
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
    at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabase> at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.populateTablesWithColumns(InformationExtractorJdbcDa> at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getTables(InformationExtractorJdbcDatabaseMetaDataIm> at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.getTablesInformation(DatabaseInformationImpl.java:120)
    at org.hibernate.tool.schema.internal.GroupedSchemaValidatorImpl.validateTables(GroupedSchemaValidatorImpl.java:39)
    at org.hibernate.tool.schema.internal.AbstractSchemaValidator.performValidation(AbstractSchemaValidator.java:89)
    at org.hibernate.tool.schema.internal.AbstractSchemaValidator.doValidation(AbstractSchemaValidator.java:68)
    at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:191)
    at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:310)
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:467)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:939)
    … 11 more
    Caused by: java.sql.SQLException: View ‚jlawyerdb.AppUserBean‘ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack > at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
    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.StatementImpl.executeQuery(StatementImpl.java:1218)
    at com.mysql.cj.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2109)
    at com.mysql.cj.jdbc.DatabaseMetaData$2.forEach(DatabaseMetaData.java:2038)
    at com.mysql.cj.jdbc.IterateBlock.doForAll(IterateBlock.java:56)
    at com.mysql.cj.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:2214)
    at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.populateTablesWithColumns(InformationExtractorJdbcDa> … 21 more

    2022-04-19 08:52:59,450 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool — 112) SQL Error: 1356, SQLState: HY000
    2022-04-19 08:52:59,451 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool — 112) View ‚jlawyerdb.AppUserBean‘ refere>2022-04-19 08:52:59,451 INFO [org.hibernate.orm.beans] (ServerService Thread Pool — 112) HHH10005004: Stopping BeanContainer : org.hibernate.resource>2022-04-19 08:52:59,451 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool — 112) MSC000001: Failed to start service jboss.persistenceunit.> at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:198)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:128)
    at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:649)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:212)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.lang.Thread.run(Thread.java:748)
    at org.jboss.threads.JBossThread.run(JBossThread.java:485)
    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: j-lawyer-server-ejbPU] Unable to build Hibernate SessionFactory
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1016)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:942)
    at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:170)
    … 9 more

    #4918
    j-lawyer.org
    Administrator

    Bitte mal diese Abfrage in MySQL ausführen:

    select version, success from flyway_schema_history;

    Ergebnis hier posten.

    #4919
    Markus
    Teilnehmer

    MariaDB [jlawyerdb]> select version, success from flyway_schema_history;
    +———–+———+
    | version | success |
    +———–+———+
    | 1.9.1.0 | 1 |
    | 1.10.0.0 | 1 |
    | 1.10.0.1 | 1 |
    | 1.10.0.2 | 1 |
    | 1.10.0.3 | 1 |
    | 1.10.0.4 | 1 |
    | 1.10.0.5 | 1 |
    | 1.10.0.6 | 1 |
    | 1.10.0.7 | 1 |
    | 1.10.0.8 | 1 |
    | 1.10.0.9 | 1 |
    | 1.10.0.10 | 1 |
    | 1.11.0.0 | 1 |
    | 1.11.0.1 | 1 |
    | 1.11.0.2 | 1 |
    | 1.12.0.0 | 1 |
    | 1.12.0.1 | 1 |
    | 1.12.0.2 | 1 |
    | 1.12.0.3 | 1 |
    | 1.12.0.4 | 1 |
    | 1.12.0.5 | 1 |
    | 1.12.0.6 | 1 |
    | 1.12.0.7 | 1 |
    | 1.12.0.8 | 1 |
    | 1.12.0.9 | 1 |
    | 1.12.0.10 | 1 |
    | 1.13.0.0 | 1 |
    | 1.13.0.1 | 1 |
    | 1.13.0.2 | 1 |
    | 1.13.0.3 | 1 |
    | 1.13.0.4 | 1 |
    | 1.13.0.5 | 1 |
    | 1.13.0.6 | 1 |
    | 1.13.0.7 | 1 |
    | 1.13.0.8 | 1 |
    | 1.13.0.9 | 1 |
    | 1.13.0.10 | 1 |
    | 1.13.0.11 | 1 |
    | 1.13.0.12 | 1 |
    | 1.13.0.13 | 1 |
    | 1.13.0.14 | 1 |
    | 1.13.0.15 | 1 |
    | 1.13.0.16 | 1 |
    | 1.13.0.17 | 1 |
    | 1.13.0.18 | 1 |
    | 1.13.0.19 | 1 |
    | 1.13.0.20 | 1 |
    | 1.13.0.21 | 1 |
    | 1.13.0.22 | 1 |
    | 1.13.0.23 | 1 |
    | 1.14.0.0 | 1 |
    | 1.14.0.1 | 1 |
    | 1.14.0.2 | 1 |
    | 1.14.0.3 | 1 |
    | 1.14.0.4 | 1 |
    | 1.14.0.5 | 1 |
    | 1.14.0.6 | 1 |
    | 1.14.0.7 | 1 |
    | 1.14.0.8 | 1 |
    | 1.14.0.9 | 1 |
    | 1.14.1.0 | 1 |
    | 1.15.0.0 | 1 |
    | 1.15.0.1 | 1 |
    | 1.15.0.2 | 1 |
    | 1.15.0.3 | 1 |
    | 1.15.0.4 | 1 |
    | 1.15.0.5 | 1 |
    | 1.15.0.6 | 1 |
    | 1.15.0.7 | 1 |
    | 1.15.0.8 | 1 |
    | 1.15.0.9 | 1 |
    | 1.15.0.10 | 1 |
    | 2.0.0.0 | 1 |
    | 2.0.0.1 | 1 |
    | 2.0.0.2 | 1 |
    | 2.0.0.3 | 1 |
    | 2.0.0.4 | 1 |
    | 2.0.1.0 | 1 |
    | 2.1.0.0 | 1 |
    | 2.1.0.1 | 1 |
    | 2.1.0.2 | 1 |
    | 2.1.0.3 | 1 |
    | 2.1.0.4 | 1 |
    | 2.1.0.5 | 1 |
    | 2.1.0.6 | 1 |
    | 2.1.0.7 | 1 |
    | 2.1.0.8 | 1 |
    | 2.1.0.9 | 0 |
    +———–+———+
    88 rows in set (0.057 sec)

    #4920
    j-lawyer.org
    Administrator

    Das Nextcloud-Passwort am Nutzer ist zu lang für den neuen Verschlüsselungsalgorithmus.

    Entweder Passwort ändern oder die Spalte cloudPassword in security_users vergrößern.

    Danach in flyway_schema_history success auf 1 setzen für Version 2.1.0.9 und den Dienst neu starten.

    #4921
    Markus
    Teilnehmer

    Das hat geklappt, vielen Dank für die schnelle Unterstützung. Ich habe die Spalte auf VARCHAR(96) vergrößert. Falls andere Kollegen auf das gleiche Problem stoßen:

    MariaDB [jlawyerdb]> alter table security_users change cloudPassword cloudPassword varchar(96);
    Query OK, 3 rows affected (1.360 sec)
    Records: 3 Duplicates: 0 Warnings: 0
    MariaDB [jlawyerdb]> update flyway_schema_history set success=’1′ where version=’2.1.0.9′;
    Query OK, 1 row affected (0.097 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    #4922
    j-lawyer.org
    Administrator

    Prima. Bitte Passwort über die Oberfläche neu setzen.

6 Beiträge anzeigen - 1 bis 6 (von insgesamt 6)
  • Du musst angemeldet sein, um zu diesem Thema eine Antwort verfassen zu können.