Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3538

Migration Error Enabling XML Workflow in DSpace 6

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 6.0
    • Fix Version/s: None
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      8
    • Documentation Status:
      Needed

      Description

      /bin/dspace database migrate

      Database URL: jdbc:postgresql://localhost:5432/dspace
      Migrating database to latest version... (Check dspace logs for details)
      Caught exception:
      java.lang.RuntimeException: Error attempting to update Bitstream Format and/or Metadata Registries
      at org.dspace.storage.rdbms.DatabaseRegistryUpdater.updateRegistries(DatabaseRegistryUpdater.java:93)
      at org.dspace.storage.rdbms.DatabaseRegistryUpdater.afterMigrate(DatabaseRegistryUpdater.java:121)
      at org.flywaydb.core.internal.command.DbMigrate$3.doInTransaction(DbMigrate.java:250)
      at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
      at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:246)
      at org.flywaydb.core.Flyway$1.execute(Flyway.java:959)
      at org.flywaydb.core.Flyway$1.execute(Flyway.java:917)
      at org.flywaydb.core.Flyway.execute(Flyway.java:1373)
      at org.flywaydb.core.Flyway.migrate(Flyway.java:917)
      at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:655)
      at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:574)
      at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:222)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
      at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
      Caused by: java.lang.NullPointerException
      at org.dspace.core.AbstractHibernateDAO.getHibernateSession(AbstractHibernateDAO.java:48)
      at org.dspace.core.AbstractHibernateDAO.createCriteria(AbstractHibernateDAO.java:108)
      at org.dspace.content.dao.impl.BitstreamFormatDAOImpl.findByMIMEType(BitstreamFormatDAOImpl.java:57)
      at org.dspace.content.BitstreamFormatServiceImpl.findByMIMEType(BitstreamFormatServiceImpl.java:95)
      at org.dspace.administer.RegistryLoader.loadFormat(RegistryLoader.java:184)
      at org.dspace.administer.RegistryLoader.loadBitstreamFormats(RegistryLoader.java:146)
      at org.dspace.storage.rdbms.DatabaseRegistryUpdater.updateRegistries(DatabaseRegistryUpdater.java:68)
      ... 17 more

      ===============================================================================================================================

      [dspace@dspace-aux-1 dspace6x-aux]$ /opt/dspace/bin/dspace database migrate ignored

      Database URL: jdbc:postgresql://localhost:5432/dspace
      Migrating database to latest version AND running previously "Ignored" migrations... (Check logs for details)
      Migration exception:
      java.sql.SQLException: Flyway migration error occurred
      at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:666)
      at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:188)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
      at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
      Caused by: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException:
      Migration V5.6_2016.08.23__DS-3097.sql failed
      ---------------------------------------------
      SQL State : 42883
      Error Code : 0
      Message : ERROR: operator does not exist: uuid = integer
      Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
      Position: 286
      Location : org/dspace/storage/rdbms/sqlmigration/postgres/V5.6_2016.08.23__DS-3097.sql (/var/data/dspace_local_build/dspace6x-aux/file:/opt/dspace/lib/dspace-api-6.1-SNAPSHOT.jar!/org/dspace/storage/rdbms/sqlmigration/postgres/V5.6_2016.08.23__DS-3097.sql)
      Line : 13
      Statement : UPDATE resourcepolicy SET action_id = 12 where action_id = 0 and resource_type_id = 0 and resource_id in (
      SELECT bundle2bitstream.bitstream_id FROM bundle2bitstream
      LEFT JOIN item2bundle ON bundle2bitstream.bundle_id = item2bundle.bundle_id
      LEFT JOIN item ON item2bundle.item_id = item.item_id
      WHERE item.withdrawn = true
      )

      at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:117)
      at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:71)
      at org.flywaydb.core.internal.command.DbMigrate.doMigrate(DbMigrate.java:352)
      at org.flywaydb.core.internal.command.DbMigrate.access$1100(DbMigrate.java:47)
      at org.flywaydb.core.internal.command.DbMigrate$4.doInTransaction(DbMigrate.java:308)
      at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
      at org.flywaydb.core.internal.command.DbMigrate.applyMigration(DbMigrate.java:305)
      at org.flywaydb.core.internal.command.DbMigrate.access$1000(DbMigrate.java:47)
      at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:230)
      at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:173)
      at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
      at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:173)
      at org.flywaydb.core.Flyway$1.execute(Flyway.java:959)
      at org.flywaydb.core.Flyway$1.execute(Flyway.java:917)
      at org.flywaydb.core.Flyway.execute(Flyway.java:1373)
      at org.flywaydb.core.Flyway.migrate(Flyway.java:917)
      at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:655)
      ... 7 more
      Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: uuid = integer
      Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
      Position: 286
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291)
      at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
      at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:305)
      at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:291)
      at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:269)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:265)
      at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
      at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
      at org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement(JdbcTemplate.java:238)
      at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:114)
      ... 23 more

        Attachments

          Activity

            People

            • Assignee:
              terrywbrady Terry Brady
              Reporter:
              terrywbrady Terry Brady
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: