cancel
Showing results for 
Search instead for 
Did you mean: 

MYSql problem while upgrading to Alfresco 3.2

breandanose
Champ in-the-making
Champ in-the-making
Hello,

Just wondering has anyone had problems like this before while upgrading from Alfresco 3stable Community to Alfresco 3.2 Community?

Error: Can't create table 'alfresco.alf_content_data' (errno: 150)


See exception details below:


11:52:46,474  ERROR [domain.schema.SchemaBootstrap] Statement execution failed:
   SQL: CREATE TABLE alf_content_data
(
   id BIGINT NOT NULL AUTO_INCREMENT,
   version BIGINT NOT NULL,
   content_url_id BIGINT NULL,
   content_mimetype_id BIGINT NULL,
   content_encoding_id BIGINT NULL,
   content_locale_id BIGINT NULL,
   CONSTRAINT fk_alf_cont_url FOREIGN KEY (content_url_id) REFERENCES alf_content_url (id),
   CONSTRAINT fk_alf_cont_mim FOREIGN KEY (content_mimetype_id) REFERENCES alf_mimetype (id),
   CONSTRAINT fk_alf_cont_enc FOREIGN KEY (content_encoding_id) REFERENCES alf_encoding (id),
   CONSTRAINT fk_alf_cont_loc FOREIGN KEY (content_locale_id) REFERENCES alf_locale (id),
   PRIMARY KEY (id)
) ENGINE=InnoDB
   Error: Can't create table 'alfresco.alf_content_data' (errno: 150)
   File: C:\Alfresco\tomcat\temp\Alfresco\AlfrescoSchema-MySQLInnoDBDialect-Upda
te-17993.sql

   Line: 56
11:52:46,489  ERROR [domain.schema.SchemaBootstrap] Schema auto-update failed
java.sql.SQLException: Can't create table 'alfresco.alf_content_data' (errno: 150)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
2 REPLIES 2

breandanose
Champ in-the-making
Champ in-the-making
Hello,

I got this resolved, For anybody having this problem in the future, the error message is a bit cryptic though. It was happening for me when upgrading MySQL. MySql 4.0 had a default Charset of "latin1" and Mysql 5.0 has a default Charset of "uft8". For Alfresco the "utf8" option should be selected if installing a new MySQL server but I was using an old one that had the default as "latin1". Anyway, to fix, I simply converted the Alfresco database to "utf8" using the MYSQL GUI tools Migration Toolkit. Hope this maybe helps someone.

mikeh
Star Contributor
Star Contributor
Thanks for the follow-up. Glad you got it sorted out.

Mike