AnsweredAssumed Answered

Upgrade Alfresco community 2.1 -> 3.3

Question asked by bob.sauvage on Sep 21, 2010
Latest reply on Dec 8, 2010 by fincoder
Hello there,

I try to upgrade my Alfresco Community 2.1 to 3.3.
As indicated in the documentation, I upgrade to "Labs 3 Final" in first.

I installed this version, I modified the configuration files to use MySQL and I test it, all works fine.
Next step, I imported my alf_data and my database.After I launched alfresco.sh start and here the "catalina.out"

Sep 21, 2010 2:15:36 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 21, 2010 2:15:37 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1307 ms
Sep 21, 2010 2:15:37 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 21, 2010 2:15:37 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Sep 21, 2010 2:15:37 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
14:15:43,712  INFO  [web.site.FrameworkHelper] Successfully Initialized Web Framework
Sep 21, 2010 2:15:43 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Sep 21, 2010 2:15:44 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
14:16:09,033  ERROR [transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Linux
   command:    [./ImageMagick/bin/convert, /usr/local/alfresco3/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_source_7306590084459240354.gif, /usr/local/alfresco3/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_3
286064094356026359.png]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "./ImageMagick/bin/convert": java.io.IOException: error=2, No such file or directory
14:16:11,695  INFO  [config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
14:16:19,902  ERROR [content.transform.RuntimeExecutableContentTransformer] Failed to start a runtime executable content transformer:
Execution result:
   os:         Linux
   command:    [./bin/pdf2swf, -V]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "./bin/pdf2swf": java.io.IOException: error=2, No such file or directory
14:16:31,570  INFO  [domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
14:16:31,635  INFO  [domain.schema.SchemaBootstrap] Executing database script /usr/local/alfresco3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-1098917062660108055.sql (Copied from classpath:alfresco
/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.2-ACL.sql).
14:16:31,955  INFO  [domain.schema.SchemaBootstrap] Executing database script /usr/local/alfresco3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-7591837188291152494.sql (Copied from classpath:alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-0-create-missing-tables.sql).
14:16:31,998  INFO  [domain.schema.SchemaBootstrap] Executing database script /usr/local/alfresco3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4691155736607618733.sql (Copied from classpath:alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/upgrade-from-2.1.sql).
14:16:36,261  ERROR [domain.schema.SchemaBootstrap] Statement execution failed:
   SQL: INSERT INTO t_summary_nstat (node_id, transaction_id)
  SELECT node_id, transaction_id FROM alf_node_status WHERE node_id IS NOT NULL
   Error: Duplicate entry '13568' for key 1
   File: /usr/local/alfresco3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-4691155736607618733.sql
   Line: 282
14:16:36,263  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '13568' for key 1
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
        at com.mysql.jdbc.Statement.execute(Statement.java:692)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:261)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:944)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:913)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:768)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:739)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:641)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1123)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        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:616)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
14:16:36,265  ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: Schema auto-update failed
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1192)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
       at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        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:616)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '13568' for key 1
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:3047)
        at com.mysql.jdbc.Statement.execute(Statement.java:692)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:261)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:944)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:913)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptUrl(SchemaBootstrap.java:768)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.checkSchemaPatchScripts(SchemaBootstrap.java:739)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:641)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1123)
        … 33 more
Sep 21, 2010 2:16:36 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 21, 2010 2:16:36 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
Sep 21, 2010 2:16:40 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 21, 2010 2:16:40 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 63512 ms
(END)

Ok I connect to the database and :

select * from alf_node_status where node_id=13568;
+———–+————-+————————————–+—————-+———+———+
| protocol  | identifier  | guid                                 | transaction_id | node_id | version |
+———–+————-+————————————–+—————-+———+———+
| archive   | SpacesStore | 001f7342-1d00-11de-b4f2-c531d0f9f932 |          16616 |   13568 |       1 |
| workspace | SpacesStore | 001f7342-1d00-11de-b4f2-c531d0f9f932 |          16616 |   13568 |       1 |
+———–+————-+————————————–+—————-+———+———+
2 rows in set (0.01 sec)

I re-import my database, I delete the doubloon (archive) and I launch again the auto update.
Same error but with another node. When I look how I have duplicates in that table, I have over 2000 !
I will still not remove them all :/ !

Does anyone have an idea of the problem?

Thanks a lot in advance,

Bob !

Outcomes