cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating from windows to Ubuntu

tbee
Champ in-the-making
Champ in-the-making
Since I have problems with CIFS on windows, I'm in the process of migrating Alfresco 3.2r2 to Ubuntu (CIFS worked like that during a test). I started with a working Ubuntu setup running alfresco 3.2 (not r2).
Next I created a new mysql database "alfresco2" and imported the mysqldump from the windows database, gave user alfresco all privileges, and changed the db.name in alfresco-global.properties.
Then I copied the alfresco.war file from windows to the webapps dir, renamed the original war, deleted the alfresco directory, and restarted tomcat6.

What amazes me is that I get "Can't create table 'alfresco2.#sql-7fc_74'".
1. Why in the world would the schema updater run? The WAR en database are in sync.
2. Why can't the table be created, user alfresco has all privileges on the database alfresco2?
7 REPLIES 7

mrogers
Star Contributor
Star Contributor
You can't migrate backwards (3.2r2 back to older version 3.2).

I suggest you migrate to exactly the same version of alfresco.   Take the WAR file from your source and use it for your target.

Edit - is that what you did?

What did you "rename the existing WAR to"   Did it still have the extension .war if so you will still have the "old" alfresco causing chaos?

The update should not run if the version is the same.  That it tried to do so indicates that the version is not correct.

There should be more information in the stack trace from mysql.   I suspect some sort of permission error or an error restoring your database.

tbee
Champ in-the-making
Champ in-the-making
You can't migrate backwards (3.2r2 back to older version 3.2).

I suggest you migrate to exactly the same version of alfresco.   Take the WAR file from your source and use it for your target.

I have an Alfresco that runs 3.2 and I am copying the 3.2r2 WAR into it. The database also is 3.2 but I exported the 3.2r2 and imported it. So for all means and purposes the Ubuntu 3.2 version is then running 3.2r2, but it still is trying to update the schema.

tbee
Champ in-the-making
Champ in-the-making

SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.alfresco.error.AlfrescoRuntimeException: 06060000 Schema auto-update failed
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1386)
        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.finishRefresh(AbstractApplicationContext.java:617)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:69)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
        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:526)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1258)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        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:583)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
Caused by: java.sql.SQLException: Can't create table 'alfresco2.#sql-7fc_83' (errno: 121)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:741)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:587)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeStatement(SchemaBootstrap.java:1092)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.executeScriptFile(SchemaBootstrap.java:1046)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.updateSchema(SchemaBootstrap.java:744)
        at org.alfresco.repo.domain.schema.SchemaBootstrap.onBootstrap(SchemaBootstrap.java:1258)
        … 39 more
Jul 6, 2010 7:21:56 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Jul 6, 2010 7:21:56 AM org.apache.catalina.core.ApplicationContext log
INFO: Shutting down Log4J

tbee
Champ in-the-making
Champ in-the-making
Ok. This is really really strange. I did a complete new install; Ubuntu 10 and Alfresco 3.3. Works. Then I imported the mysql 3.2r2 database and restarted Alfresco: same error!

org.alfresco.error.AlfrescoRuntimeException: 06060000 Schema auto-update failed
Caused by: java.sql.SQLException: Can't create table 'alfresco.#sql-138e_36' (errno: 121)

How can this be? This is Alfresco 3.3!

tbee
Champ in-the-making
Champ in-the-making
Making the mysqldump from Ubuntu instead of Windows does not make a difference.

I'm running out of options.

tbee
Champ in-the-making
Champ in-the-making
Ok. It seems that this may be caused by the fact that Alfresco's installation on windows has the JBMP_* table filenames in lowercase and on Linux these filenames are uppercase.

On windows show tables gives:
+——————————–+
| Tables_in_alfresco             |
+——————————–+
| alf_access_control_entry       |
| alf_access_control_list        |
| alf_ace_context                |
| alf_acl_change_set             |
| alf_acl_member                 |
| alf_activity_feed              |
| alf_activity_feed_control      |
| alf_activity_post              |
| alf_applied_patch              |
| alf_attributes                 |
| alf_audit_app                  |
| alf_audit_config               |
| alf_audit_date                 |
| alf_audit_entry                |
| alf_audit_fact                 |
| alf_audit_model                |
| alf_audit_source               |
| alf_authority                  |
| alf_authority_alias            |
| alf_child_assoc                |
| alf_content_clean              |
| alf_content_data               |
| alf_content_url                |
| alf_encoding                   |
| alf_global_attributes          |
| alf_list_attribute_entries     |
| alf_locale                     |
| alf_lock                       |
| alf_lock_resource              |
| alf_map_attribute_entries      |
| alf_mimetype                   |
| alf_namespace                  |
| alf_node                       |
| alf_node_aspects               |
| alf_node_assoc                 |
| alf_node_properties            |
| alf_permission                 |
| alf_prop_class                 |
| alf_prop_date_value            |
| alf_prop_double_value          |
| alf_prop_link                  |
| alf_prop_root                  |
| alf_prop_serializable_value    |
| alf_prop_string_value          |
| alf_prop_unique_ctx            |
| alf_prop_value                 |
| alf_qname                      |
| alf_server                     |
| alf_store                      |
| alf_transaction                |
| alf_usage_delta                |
| alf_version_count              |
| avm_aspects                    |
| avm_child_entries              |
| avm_history_links              |
| avm_merge_links                |
| avm_node_properties            |
| avm_nodes                      |
| avm_store_properties           |
| avm_stores                     |
| avm_version_layered_node_entry |
| avm_version_roots              |
| jbpm_action                    |
| jbpm_bytearray                 |
| jbpm_byteblock                 |
| jbpm_comment                   |
| jbpm_decisionconditions        |
| jbpm_delegation                |
| jbpm_event                     |
| jbpm_exceptionhandler          |
| jbpm_job                       |
| jbpm_log                       |
| jbpm_moduledefinition          |
| jbpm_moduleinstance            |
| jbpm_node                      |
| jbpm_pooledactor               |
| jbpm_processdefinition         |
| jbpm_processinstance           |
| jbpm_runtimeaction             |
| jbpm_swimlane                  |
| jbpm_swimlaneinstance          |
| jbpm_task                      |
| jbpm_taskactorpool             |
| jbpm_taskcontroller            |
| jbpm_taskinstance              |
| jbpm_token                     |
| jbpm_tokenvariablemap          |
| jbpm_transition                |
| jbpm_variableaccess            |
| jbpm_variableinstance          |
+——————————–+

On Ubunut show tables gives:
+——————————–+
| Tables_in_alfresco             |
+——————————–+
| JBPM_ACTION                    |
| JBPM_BYTEARRAY                 |
| JBPM_BYTEBLOCK                 |
| JBPM_COMMENT                   |
| JBPM_DECISIONCONDITIONS        |
| JBPM_DELEGATION                |
| JBPM_EVENT                     |
| JBPM_EXCEPTIONHANDLER          |
| JBPM_JOB                       |
| JBPM_LOG                       |
| JBPM_MODULEDEFINITION          |
| JBPM_MODULEINSTANCE            |
| JBPM_NODE                      |
| JBPM_POOLEDACTOR               |
| JBPM_PROCESSDEFINITION         |
| JBPM_PROCESSINSTANCE           |
| JBPM_RUNTIMEACTION             |
| JBPM_SWIMLANE                  |
| JBPM_SWIMLANEINSTANCE          |
| JBPM_TASK                      |
| JBPM_TASKACTORPOOL             |
| JBPM_TASKCONTROLLER            |
| JBPM_TASKINSTANCE              |
| JBPM_TOKEN                     |
| JBPM_TOKENVARIABLEMAP          |
| JBPM_TRANSITION                |
| JBPM_VARIABLEACCESS            |
| JBPM_VARIABLEINSTANCE          |
| alf_access_control_entry       |
| alf_access_control_list        |
| alf_ace_context                |
| alf_acl_change_set             |
| alf_acl_member                 |
| alf_activity_feed              |
| alf_activity_feed_control      |
| alf_activity_post              |
| alf_applied_patch              |
| alf_attributes                 |
| alf_audit_app                  |
| alf_audit_config               |
| alf_audit_date                 |
| alf_audit_entry                |
| alf_audit_fact                 |
| alf_audit_model                |
| alf_audit_source               |
| alf_authority                  |
| alf_authority_alias            |
| alf_child_assoc                |
| alf_content_clean              |
| alf_content_data               |
| alf_content_url                |
| alf_encoding                   |
| alf_global_attributes          |
| alf_list_attribute_entries     |
| alf_locale                     |
| alf_lock                       |
| alf_lock_resource              |
| alf_map_attribute_entries      |
| alf_mimetype                   |
| alf_namespace                  |
| alf_node                       |
| alf_node_aspects               |
| alf_node_assoc                 |
| alf_node_properties            |
| alf_permission                 |
| alf_prop_class                 |
| alf_prop_date_value            |
| alf_prop_double_value          |
| alf_prop_link                  |
| alf_prop_root                  |
| alf_prop_serializable_value    |
| alf_prop_string_value          |
| alf_prop_unique_ctx            |
| alf_prop_value                 |
| alf_qname                      |
| alf_server                     |
| alf_store                      |
| alf_transaction                |
| alf_usage_delta                |
| alf_version_count              |
| avm_aspects                    |
| avm_child_entries              |
| avm_history_links              |
| avm_merge_links                |
| avm_node_properties            |
| avm_nodes                      |
| avm_store_properties           |
| avm_stores                     |
| avm_version_layered_node_entry |
| avm_version_roots              |
+——————————–+

This means that Alfresco create the tables with different case on each OS?

tbee
Champ in-the-making
Champ in-the-making
To be more exact; the Alfresco community edition windows installation has not configured mysql so that easy migration to Linux is possible.

http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

I have 'sed"ed all JBPM tables in the dump from lowercase to uppercase and then it worked.
cat $1 |
sed "s/\`jbpm_action\`/\`JBPM_ACTION\`/g" |
sed "s/\`jbpm_bytearray\`/\`JBPM_BYTEARRAY\`/g" |
sed "s/\`jbpm_byteblock\`/\`JBPM_BYTEBLOCK\`/g" |
sed "s/\`jbpm_comment\`/\`JBPM_COMMENT\`/g" |
sed "s/\`jbpm_decisionconditions\`/\`JBPM_DECISIONCONDITIONS\`/g" |
sed "s/\`jbpm_delegation\`/\`JBPM_DELEGATION\`/g" |
sed "s/\`jbpm_event\`/\`JBPM_EVENT\`/g" |
sed "s/\`jbpm_exceptionhandler\`/\`JBPM_EXCEPTIONHANDLER\`/g" |
sed "s/\`jbpm_job\`/\`JBPM_JOB\`/g" |
sed "s/\`jbpm_log\`/\`JBPM_LOG\`/g" |
sed "s/\`jbpm_moduledefinition\`/\`JBPM_MODULEDEFINITION\`/g" |
sed "s/\`jbpm_moduleinstance\`/\`JBPM_MODULEINSTANCE\`/g" |
sed "s/\`jbpm_node\`/\`JBPM_NODE\`/g" |
sed "s/\`jbpm_pooledactor\`/\`JBPM_POOLEDACTOR\`/g" |
sed "s/\`jbpm_processdefinition\`/\`JBPM_PROCESSDEFINITION\`/g" |
sed "s/\`jbpm_processinstance\`/\`JBPM_PROCESSINSTANCE\`/g" |
sed "s/\`jbpm_runtimeaction\`/\`JBPM_RUNTIMEACTION\`/g" |
sed "s/\`jbpm_swimlane\`/\`JBPM_SWIMLANE\`/g" |
sed "s/\`jbpm_swimlaneinstance\`/\`JBPM_SWIMLANEINSTANCE\`/g" |
sed "s/\`jbpm_task\`/\`JBPM_TASK\`/g" |
sed "s/\`jbpm_taskactorpool\`/\`JBPM_TASKACTORPOOL\`/g" |
sed "s/\`jbpm_taskcontroller\`/\`JBPM_TASKCONTROLLER\`/g" |
sed "s/\`jbpm_taskinstance\`/\`JBPM_TASKINSTANCE\`/g" |
sed "s/\`jbpm_token\`/\`JBPM_TOKEN\`/g" |
sed "s/\`jbpm_tokenvariablemap\`/\`JBPM_TOKENVARIABLEMAP\`/g" |
sed "s/\`jbpm_transition\`/\`JBPM_TRANSITION\`/g" |
sed "s/\`jbpm_variableaccess\`/\`JBPM_VARIABLEACCESS\`/g" |
sed "s/\`jbpm_variableinstance\`/\`JBPM_VARIABLEINSTANCE\`/g" |
cat