cancel
Showing results for 
Search instead for 
Did you mean: 

Migration from 4.2.c to 5.1.g Community

joko71
Confirmed Champ
Confirmed Champ
I'm having a problem with migration on my Win-32 XP Professional VM machine. Server is JBoss 5.1.0 GA with Java 7 JDK and DB is MySQL 5.5.28.
We haven't used Solr in 4.2.c.

I was kinda expecting that upgrade from 4.2.c to 5.1.g will go pretty smooth.

In server.log the first strange occurence was the loop of these lines repeating:


[domain.schema.SchemaBootstrap] Schema validation found 48 potential problems, results written to: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Alfresco\Alfresco-MySQLInnoDBDialect-Validation-Pre-Upgrade-act_-1323738560616869338.txt
2016-07-11 09:50:06,358 INFO  [STDOUT] (main) 09:50:06,358 INFO  [domain.schema.SchemaBootstrap] Normalized schema dumped to file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Alfresco\Alfresco-schema-MySQLInnoDBDialect-pre-upgrade-alf_-3847783597295113832.xml.
2016-07-11 09:50:06,358 INFO  [STDOUT] (main) 09:50:06,358 INFO  [domain.schema.SchemaBootstrap] Normalized schema dumped to file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Alfresco\Alfresco-schema-MySQLInnoDBDialect-pre-upgrade-jbpm_-5836808321826424787.xml.
2016-07-11 09:50:06,358 INFO  [STDOUT] (main) 09:50:06,358 INFO  [domain.schema.SchemaBootstrap] Normalized schema dumped to file C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Alfresco\Alfresco-schema-MySQLInnoDBDialect-pre-upgrade-act_-2347445323115065111.xml.


And then, after a not so small number of iterations, it gave up with the message in the log:


2016-07-11 09:50:11,389 INFO  [STDOUT] (main) 09:50:11,373 ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
org.alfresco.error.AlfrescoRuntimeException: 06110000 A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1716)
   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)



2016-07-11 09:50:11,420 INFO  [STDOUT] (main) 09:50:11,420 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 06110001 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:3910)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
   at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
   at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
   at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
   at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
   at org.jboss.web.deployers.WebModule.start(WebModule.java:97)



Caused by: org.alfresco.error.AlfrescoRuntimeException: 06110000 A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1716)
   … 79 more
2016-07-11 09:50:11,436 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] (main) Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener
org.alfresco.error.AlfrescoRuntimeException: 06110001 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)



2016-07-11 09:50:11,452 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] (main) Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.alfresco.error.AlfrescoRuntimeException: 06110001 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)



Caused by: org.alfresco.error.AlfrescoRuntimeException: 06110000 A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1716)
   … 79 more
2016-07-11 09:50:11,467 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/alfresco]] (main) Exception sending context initialized event to listener instance of class org.alfresco.repo.webdav.WebDAVSessionListener
org.alfresco.error.AlfrescoRuntimeException: 06110001 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 java.lang.Thread.run(Thread.java:722)
Caused by: org.alfresco.error.AlfrescoRuntimeException: 06110000 A previous schema upgrade failed or was not completed.  Revert to the original database before attempting the upgrade again.
   at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1716)
   … 79 more


Dumped difference files and verbose server log are in the attachment.

I hope you can help me. Thanks in advance.
7 REPLIES 7

joko71
Confirmed Champ
Confirmed Champ
Has anyone encountered this loop behavior in upgrade and why that happens?

Here's also my repository.properties file from VM, maybe something in it is causing the behavior.

angelborroy
Community Manager Community Manager
Community Manager
It means that Alfresco cannot upgrade database schema. Try upgrading to 4.2.f or 5.0.d instead of targeting directly 5.1.g
Hyland Developer Evangelist

I tried with 5.0.d first. I've got the same thing as with 5.1.g, the upgrade enters into endless loop. Dissapointing, after so many setuping. Next chance is 4.2.f. 😕

Here's my latest repository properties file, just in case someone notices something wrong.

joko71
Confirmed Champ
Confirmed Champ
I really hoped this upgrade path would work, but no, the same endless loop happens with upgrade attempts to 5.1.g, 5.0.d, and 4.2.f. The last one is surprising to me because our 4.2.c current version is not too far.

Maybe our upgrade past is the problem? It goes like this:

2.1 –> 3.2 –> 3.4.d –> 4.0.d –> 4.2.c

(2.1, 3.2 and 4.2.c were/are working versions, others were just temporaries on upgrade path)

I can try to upgrade it to 4.2.d or 4.2.e and see what will happen, but I'm worried if we're blocked by someting in further upgrades. 😕

angelborroy
Community Manager Community Manager
Community Manager
We have tested these paths: http://www.keensoft.es/en/alfresco-upgrade-paths-for-community-edition/

Hope it helps.
Hyland Developer Evangelist

It seems I solved the problem.

I've found the solution by accident on this page: https://wiki.alfresco.com/wiki/Schema_Upgrade_Scripts

Quote:

<blockquote>
The following properties control the generation and execution of SQL statements to modify the Alfresco schema and data (defaults shown):
db.schema.update=true
db.schema.update.lockRetryCount=24
db.schema.update.lockRetryWaitSeconds=5
db.schema.update=true:

When this is off, Alfresco will not generate or execute any SQL statements. This can be used to completely avoid any metadata queries between upgrades.

db.schema.update.lockRetryCount and db.schema.update.lockRetryWaitSeconds:
If schema updates are on and some modifying SQL has been generated, then the system attempts to get a lock against the database by creating a lock table alf_bootstrap_lock. If the table already exists, the system will wait and repeat the process of metadata examination and script generation. If the lock table cannot be created after all the retry attempts have been exhausted, the system will post a message and exit:
</blockquote>

So, if there is in Alfresco DB lock table, Alfresco will try to perform update defined number of time in a loop, then exit.

For some reason, I had alf_bootstrap_lock table in my Alfresco development DB which I used on my VM. When droppped, 4.2.c –> 4.2.f –> 5.0.d upgrades went just fine. Upgrade 5.0.d –> 5.1.g seems OK, but JBoss stops or freezes when Alfresco WAR is started. Probably is something wrong in web.xml or libraries.

joko71
Confirmed Champ
Confirmed Champ
As I said in previous post, I have a new problem. It seems upgrade is finished, but JBoss stops or freezes when Alfresco WAR is started. I tried to tinker with repository.properties and web.xml but nothing.

Alfresco 5.1.g has different structure than before, that's obvious. I don't know where to look next. One of the changed files is jboss-web.xml. I tried to use it like this:


<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">

<jboss-web>
   <resource-ref>
      <res-ref-name>jdbc/dataSource</res-ref-name>
      <jndi-name>java:alfresco-datasource</jndi-name>
   </resource-ref>

   <resource-ref>
      <res-ref-name>jdbc/activitiIdGeneratorDataSource</res-ref-name>
      <jndi-name>java:alfresco-datasource</jndi-name>
   </resource-ref>
</jboss-web>