AnsweredAssumed Answered

Error: Can't create table 'alfresco_222.#sql-52f_97

Question asked by nicolasraoul on Jan 28, 2011
Latest reply on Feb 9, 2011 by nicolasraoul
Hello all!

I am trying to upgrade from Alfresco 2.2.1 to 2.2.2 but receive an SQLException. Here is what I did:
1) Backup database from Alfresco 2.2.1
2) Backup contentstore, contentstore.deleted, audit.contentstore from Alfresco 2.2.1
3) Install Alfresco 2.2.2 and start/stop it once
4) Replace tables and alf_data with backup
5) Start Alfresco, I get:

16:42:16,994 WARN  [org.springframework.remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
16:42:17,389 DEBUG [org.alfresco.repo.model.filefolder.FileFolderPerformanceTester] preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@19b7dfa, name=log4j:logger=org.alfresco.repo.model.filefolder.FileFolderPerformanceTester
16:42:17,390 DEBUG [org.alfresco.repo.avm.TransactionalLookupCache.init] preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@19b7dfa, name=log4j:logger=org.alfresco.repo.avm.TransactionalLookupCache.init
16:42:19,960 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
16:42:20,479 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script /home/nico/programs/Alfresco/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8039251262533655706.sql (Generated).
16:42:24,468 ERROR [org.alfresco.repo.domain.schema.SchemaBootstrap] Statement execution failed:
   SQL: alter table JBPM_ACTION add index FK_ACTION_REFACT (REFERENCEDACTION_), add constraint FK_ACTION_REFACT foreign key (REFERENCEDACTION_) references JBPM_ACTION (ID_)
   Error: Can't create table 'alfresco_222.#sql-52f_97' (errno: 121)
   File: /home/nico/programs/Alfresco/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-8039251262533655706.sql
   Line: 29
16:42:24,469 ERROR [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema auto-update failed
java.sql.SQLException: Can't create table 'alfresco_222.#sql-52f_97' (errno: 121)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)

Any idea what I did wrong?
If that matters, all tables use InnoDB, and Alfresco is Enterprise version.
Thanks a lot!
Nicolas Raoul

Outcomes