Hi Luigi,

I ran into the same problem trying to install DSpace-CRIS (the
dspace-5_x_x-cris branch) on top of a DSpace 5.x database. The repair fixed
the checksum issue. However, it seems that the auto-detection of which
migrations were already present (PreInit) does not work correctly for the
CRIS migrations - the 1.8.2.* migrations should be marked as Ignored, not
PreInit.

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State
  |
+----------------+----------------------------+---------------------+---------+
| 1.1            | Initial DSpace 1.1 databas |                     |
PreInit |
| 1.2            | Upgrade to DSpace 1.2 sche |                     |
PreInit |
| 1.3            | Upgrade to DSpace 1.3 sche |                     |
PreInit |
| 1.3.9          | Drop constraint for DSpace |                     |
PreInit |
| 1.4            | Upgrade to DSpace 1.4 sche |                     |
PreInit |
| 1.5            | Upgrade to DSpace 1.5 sche |                     |
PreInit |
| 1.5.9          | Drop constraint for DSpace |                     |
PreInit |
| 1.6            | Upgrade to DSpace 1.6 sche |                     |
PreInit |
| 1.7            | Upgrade to DSpace 1.7 sche |                     |
PreInit |
| 1.8            | Upgrade to DSpace 1.8 sche |                     |
PreInit |
| 1.8.2.0        | DSpaceCRIS-crismodule data |                     |
PreInit |
| 1.8.2.1        | DSpaceCRIS-crispubmed data |                     |
PreInit |
| 1.8.2.2        | DSpaceCRIS-subscription da |                     |
PreInit |
| 3.0            | Initializing from DSpace 3 | 2015-11-09 15:50:40 |
Success |
| 3.2.1.0        | DSpaceCRIS-Upgrade-crismod |                     |
Ignored |
| 4.0            | Upgrade to DSpace 4.x sche | 2015-11-09 15:50:41 |
Success |
| 4.1.0.0        | DSpaceCRIS-Upgrade-crismod |                     |
Ignored |
| 4.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     |
Ignored |
| 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2015-11-09 15:50:44 |
Success |
| 5.0.2014.09.25 | DS 1582 Metadata For All O | 2015-11-09 15:50:45 |
Success |
| 5.0.2014.09.26 | DS-1582 Metadata For All O | 2015-11-09 15:50:45 |
Success |
| 5.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.3.0.1        | FIX-SNAPSHOT-DSpaceCRIS-Up |                     |
Pending |
| 5.3.0.2        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.3.0.3        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.3.0.4        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.3.0.5        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.3.0.6        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.3.1.0        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.3.1.1        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.4.0.0        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.4.0.1        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.5.0.1        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.5.1.0        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.5.1.1        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
| 5.5.1.2        | DSpaceCRIS-Upgrade-crismod |                     |
Pending |
+----------------+----------------------------+---------------------+---------+

Manually importing the 1.8.2.* migrations and then resuming with
"/dspace/bin/dspace database migrate ignored" seems to have succeeded.

The detection of 1.8.2.* migrations most likely needs to be fixed in
DSpace-CRIS.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette


On Wed, Aug 31, 2016 at 1:21 PM, Luigi Andrea Pascarelli <
[email protected]> wrote:

> Dear Sean,
>
> please can you share with us the output of "bin/dspace database info"
> command?
>
> Your error does not make sense to me because the relation *cris_do_wpointer
> * should be built into V1.8.2.0 sql file.
>
> With the command sent by Jordan we expect that all Ignored rows are now
> applyed into database so also the V1.8.2.0 file.
>
> In any case there is a workaround. The workaround is apply manually this
> three sql:
>
> https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/
> dspace-api/src/main/resources/org/dspace/storage/rdbms/
> sqlmigration/postgres/V1.8.2.0__DSpaceCRIS-crismodule_database_schema.sql
>
> https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/
> dspace-api/src/main/resources/org/dspace/storage/rdbms/
> sqlmigration/postgres/V1.8.2.1__DSpaceCRIS-crispubmed_database_schema.sql
>
> https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/
> dspace-api/src/main/resources/org/dspace/storage/rdbms/
> sqlmigration/postgres/V1.8.2.2__DSpaceCRIS-subscription_
> database_schema.sql
>
> And go on with:
>
> bin/dspace database repair
>
> bin/dspace database migrate ignored
> Hope this helps.
>
> Andrea
>
>
> Il 31/08/2016 12:23, Sean Carte ha scritto:
>
>
> On 31 August 2016 at 12:00, Jordan Piščanc <[email protected]>
> wrote:
>
>> I have same problem with the migration from DSpace5.1 to DSpace-CRIS5.3
>>
>> I solved with:
>>
>> bin/dspace database repair
>> bin/dspace database migrate ignored
>>
>> Let us know if it works for you.
>>
>
> Thanks, Jordan; unfortunately that only produces more errors:
>
> dspace@dspace:~$ /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)
> Caught exception:
> java.sql.SQLException: Flyway migration error occurred
>     at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(
> DatabaseUtils.java:483)
>     at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:184)
>     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.dspace.app.launcher.ScriptLauncher.runOneCommand(
> ScriptLauncher.java:226)
>     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
> Caused by: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException:
> Error executing statement at line 9: alter table cris_do_wpointer add
> column urlPath varchar(255)
>     at org.flywaydb.core.internal.dbsupport.SqlScript.execute(
> SqlScript.java:91)
>     at org.flywaydb.core.internal.resolver.sql.
> SqlMigrationExecutor.execute(SqlMigrationExecutor.java:73)
>     at org.flywaydb.core.internal.command.DbMigrate$5.
> doInTransaction(DbMigrate.java:287)
>     at org.flywaydb.core.internal.command.DbMigrate$5.
> doInTransaction(DbMigrate.java:285)
>     at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.
> execute(TransactionTemplate.java:72)
>     at org.flywaydb.core.internal.command.DbMigrate.
> applyMigration(DbMigrate.java:285)
>     at org.flywaydb.core.internal.command.DbMigrate.access$800(
> DbMigrate.java:46)
>     at org.flywaydb.core.internal.command.DbMigrate$2.
> doInTransaction(DbMigrate.java:207)
>     at org.flywaydb.core.internal.command.DbMigrate$2.
> doInTransaction(DbMigrate.java:156)
>     at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.
> execute(TransactionTemplate.java:72)
>     at org.flywaydb.core.internal.command.DbMigrate.migrate(
> DbMigrate.java:156)
>     at org.flywaydb.core.Flyway$1.execute(Flyway.java:864)
>     at org.flywaydb.core.Flyway$1.execute(Flyway.java:811)
>     at org.flywaydb.core.Flyway.execute(Flyway.java:1171)
>     at org.flywaydb.core.Flyway.migrate(Flyway.java:811)
>     at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(
> DatabaseUtils.java:472)
>     ... 7 more
> Caused by: org.postgresql.util.PSQLException: ERROR: relation
> "cris_do_wpointer" does not exist
>     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
> QueryExecutorImpl.java:2103)
>     at org.postgresql.core.v3.QueryExecutorImpl.processResults(
> QueryExecutorImpl.java:1836)
>     at org.postgresql.core.v3.QueryExecutorImpl.execute(
> QueryExecutorImpl.java:257)
>     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
> AbstractJdbc2Statement.java:512)
>     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
> AbstractJdbc2Statement.java:374)
>     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
> AbstractJdbc2Statement.java:366)
>     at org.apache.commons.dbcp.DelegatingStatement.execute(
> DelegatingStatement.java:264)
>     at org.apache.commons.dbcp.DelegatingStatement.execute(
> DelegatingStatement.java:264)
>     at org.apache.commons.dbcp.DelegatingStatement.execute(
> DelegatingStatement.java:264)
>     at org.flywaydb.core.internal.dbsupport.JdbcTemplate.
> executeStatement(JdbcTemplate.java:235)
>     at org.flywaydb.core.internal.dbsupport.SqlScript.execute(
> SqlScript.java:89)
>     ... 22 more
>
>
> Sean
> --
>
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Luigi Andrea Pascarelli
>
> DSpace Committer and DSpace-CRIS Lead Developer
>
> 4Science,  www.4science.it (an Itway Group Company)
>
> office: Via Edoardo D'Onofrio 304, 00155 Roma, Italy
> tel: +39 333 934 1782
> skype: l_a_p82
> linkedin: luigiandreapascarelli
>
> ====================================
> Salvate un albero. Non stampate questa mail se non necessario.
> Save a tree. Don't print this e-mail unless it's really necessary.
>
> DISCLAIMER: Le informazioni contenute in questo messaggio sono confidenziali, 
> possono essere protette da leggi locali,
> e devono essere utilizzate esclusivamente dal destinatario.  La 
> pubblicazione, l'utilizzo, la divulgazione, la stampa
> o la copia non autorizzata del contenuto della presente e-mail sono 
> espressamente vietate e potenzialmente illegali.
> Nel caso si sia ricevuto il presente messaggio per errore, si prega di 
> cancellarlo e di inviarne notifica al mittente.
>
> DISCLAIMER: The information contained in this message is confidential, can be 
> legally protected by local Laws,
> and must be exclusively used by the recipient. The publication, use, 
> distribution, printing or unauthorized copy
> of the content of this message is strictly forbidden and it can be illegal. 
> If you received this message by mistake,
> please destroy it and notify it to the sender.
>
> --
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/dspace-tech.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to