cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade from 4.2.d to 201602 fails

hoomanv
Confirmed Champ
Confirmed Champ
Hi,

v1 = 4.2.d community
v2 = 201602 community

Steps:
1) Cleanly installed v2 and it worked.
2) Dropped database and deleted the contentstore, contentstore.deleted directories of v2
3) Recreated v2 database and restored v1 db.dump on it
4) Copied contentstore, contentstore.deleted dirs of v1 to v2
5) Started alfresco
6) Now I cannot sign in to share any more

I spotted this exception in the logs


org.alfresco.error.AlfrescoRuntimeException: 02130000 Schema auto-update failed
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1802)
        at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:207)
        at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:178)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1859)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: constraint "act_ru_execution_proc_def_id__business_key__key" of relation "act_ru_execution" does not exist
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:398)
        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.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1539)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1481)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:1138)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:1109)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:1009)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1703)
        … 23 more
1 ACCEPTED ANSWER

hoomanv
Confirmed Champ
Confirmed Champ

Upgrade from 5.0.a to 5.0.c failed with the same error.

Then I found Upgrade from 4.1.3 to 5.0 and executed the SQL statements below:

ALTER INDEX act_ru_execution_proc_def_id__key RENAME TO act_ru_execution_proc_def_id__business_key__key;
ALTER INDEX act_hi_procinst_proc_def_id__key RENAME TO act_hi_procinst_proc_def_id__business_key__key;

Which solved the problem of upgrading 5.0.a directly to 5.0.d

View answer in original post

4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
Hello,

upgrading Community versions is not always possible from any version to the newest version in just one step. You might want to try doing sequential upgrades, e.g. from 4.2.d to 4.2.f (latest on 4.2 line), then to 5.0.d and then to latest 5.1 / GA.

The specific error in your case appears to the result of a too optimistic schema patch which expected a specific DB structure to exist (most likely one that 5.0.x might have introduced). This may also be the result of an error in 4.2.d which may not have included a performance-relevant constraint / index. This issue would be one of the common reasons to do the upgrade in multiple steps.

Regards
Axel

hoomanv
Confirmed Champ
Confirmed Champ

I'm back after 2 years, trying to give it another try.

So far, I have gone through this upgrade path successfully: 4.2.d >> 4.2.f >> 5.0.a

Trying to upgrade 5.0.a to 5.0.d gives me the exact same error:

> constraint "act_ru_execution_proc_def_id__business_key__key" of relation "act_ru_execution" does not exist

So I'm considering either 5.0.b or 5.0.c if I get lucky.

douglascrp
World-Class Innovator
World-Class Innovator

You were using the version 5.0.a, which was a kind of "experimental" version, as mentioned in the release notes: Alfresco Community 5.0.a Release Notes 

Being the first community release for 5.0, this has undergone limited testing and care should taken before upgrading any previous Alfresco Community version with this version.

And saying that the path is not documented, I can not agree with that: Alfresco Content Services upgrade paths | Alfresco Documentation 

hoomanv
Confirmed Champ
Confirmed Champ

Upgrade from 5.0.a to 5.0.c failed with the same error.

Then I found Upgrade from 4.1.3 to 5.0 and executed the SQL statements below:

ALTER INDEX act_ru_execution_proc_def_id__key RENAME TO act_ru_execution_proc_def_id__business_key__key;
ALTER INDEX act_hi_procinst_proc_def_id__key RENAME TO act_hi_procinst_proc_def_id__business_key__key;

Which solved the problem of upgrading 5.0.a directly to 5.0.d