AnsweredAssumed Answered

Upgrade from 3.4.d to 4.0.a/c/d

Question asked by n002213f on Jun 30, 2012
Latest reply on Sep 11, 2013 by jurica
I have a nusty error when i try to upgrade (using the Upgrade steps in from alfresco 3.4.d to 4.0.d community.

My Environment is as follows:
Ubuntu 12.04
MySQL 5.5 / 5.1.63 (i have tried both version and setting lower_case_table_names=1 )
Apache Tomcat 6.0.35

I get the error below:

2012-06-30 17:16:21,252  WARN  [alfresco.util.AbstractTriggerBean] [main] Job ehCacheTracerJob is not active/enabled
2012-06-30 17:16:24,422  INFO  [extensions.webscripts.TemplateProcessorRegistry] [main] Registered template processor Repository Template Processor for extension ftl
2012-06-30 17:16:24,425  INFO  [extensions.webscripts.ScriptProcessorRegistry] [main] Registered script processor Repository Script Processor for extension js
2012-06-30 17:16:30,197  INFO  [domain.schema.SchemaBootstrap] [main] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
2012-06-30 17:16:31,865  INFO  [domain.schema.SchemaBootstrap] [main] Executing database script /opt/software/alfresco/4.0.a/apache-tomcat-6.0.35/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-Update-2957393249369399918.sql (Generated).
2012-06-30 17:16:34,277  ERROR [domain.schema.SchemaBootstrap] [main] 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 'lrc_dm_34d.#sql-22cf_28' (errno: 121)
   File: /opt/software/alfresco/4.0.a/apache-tomcat-6.0.35/temp/Alfresco/AlfrescoSchema-MySQLInnoDBDialect-Update-2957393249369399918.sql
   Line: 29
2012-06-30 17:16:34,279  ERROR [domain.schema.SchemaBootstrap] [main] Schema auto-update failed
java.sql.SQLException: Can't create table 'lrc_dm_34d.#sql-22cf_28' (errno: 121)
   at com.mysql.jdbc.SQLError.createSQLException(
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(
   at com.mysql.jdbc.MysqlIO.sendCommand(
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
   at com.mysql.jdbc.ConnectionImpl.execSQL(
   at com.mysql.jdbc.ConnectionImpl.execSQL(
   at com.mysql.jdbc.StatementImpl.execute(
   at com.mysql.jdbc.StatementImpl.execute(

Any help or pointers will be greatly appreciated.


if i change the sql to lower case,

alter table jbpm_action add index fk_action_refact (referencedaction_), add constraint fk_action_refact foreign key (referencedaction_) references jbpm_action (id_);

i get a different error (ERROR 1061 (42000): Duplicate key name 'fk_action_refact'), and suspect this has to do with the database.