cancel
Showing results for 
Search instead for 
Did you mean: 

Direct migration 2.1 -> 3.3 is it possible?

joko71
Confirmed Champ
Confirmed Champ
Hi,

I've googled the net to find out if direct migration 2.1 -> 3.3 is possible. All I've found is recommendations to go with intermediary versions, but not the definite answer if direct migration is possible/not possible.

Can someone tell me if direct migration is possible, and if it is not possible, why?

Our original version is 2.1.0 (482) schema 64.

We succeeded in starting our customized applications with empty 3.3 DB schema, but when we try to replace it with 2.1 DB schema, Alfresco instead of starting migration scripts complains that repository folder alf_data is not set correctly because it cannot find something, and recommends full reindex.

When we do full reindex, Aflresco discovers only 300+ transactions instead of 100 thousand or more, quickly comes to 100%, then crashes.

08:36:22,284 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformerWorker] ImageMagickContentTransformerWorker not available: 02250000 Failed to perform ImageMagick transformation: 
Execution result:
   os:         Windows 7
   command:    [./ImageMagick/bin/convert, C:\Users\XXX~1\AppData\Local\Temp\Alfresco\ImageMagickContentTransformerWorker_init_source_6364639058770917388.gif[0], C:\Users\XXX~1\AppData\Local\Temp\Alfresco\ImageMagickContentTransformerWorker_init_target_3213253993101127691.png]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "./ImageMagick/bin/convert": CreateProcess error=2, The system cannot find the file specified
08:36:22,331 ERROR [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker] Failed to start a runtime executable content transformer:
Execution result:
   os:         Windows 7
   command:    [./bin/pdf2swf, -V]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "./bin/pdf2swf": CreateProcess error=2, The system cannot find the file specified
08:36:22,456 INFO  [org.alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
08:36:22,956 ERROR [org.alfresco.util.exec.RuntimeExecBootstrapBean] Bootstrap command failed:
Execution result:
   os:         Windows 7
   command:    [soffice, -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager, -env:UserInstallation=file:///C:/Jboss/bin/alf_data/oouser, -nologo, -headless, -nofirststartwizard, -nocrashrep, -norestore]
   succeeded:  false
   exit code:  2
   out:       
   err:        Cannot run program "soffice": CreateProcess error=2, The system cannot find the file specified
08:36:25,143 WARN  [org.alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
08:36:49,987 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Index recovery started: 365 transactions.
08:36:50,050 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    10 % complete.
08:36:50,050 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    20 % complete.
08:36:50,065 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    30 % complete.
08:36:50,065 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    40 % complete.
08:36:50,081 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    50 % complete.
08:36:50,097 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    60 % complete.
08:36:50,097 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    70 % complete.
08:36:50,112 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    80 % complete.
08:36:50,112 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    90 % complete.
08:36:50,128 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent]    100 % complete.
08:37:51,081 INFO  [org.alfresco.repo.node.index.FullIndexRecoveryComponent] Index recovery completed.
08:37:51,753 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Jboss\bin\alf_data
08:37:51,768 ERROR [org.alfresco.repo.admin.ConfigurationChecker] CONTENT INTEGRITY ERROR: System content not found in content store.
08:37:51,784 ERROR [org.alfresco.repo.admin.ConfigurationChecker] Ensure that the 'dir.root' property is pointing to the correct data location.
08:37:51,800 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 02250001 Ensure that the 'dir.root' property is pointing to the correct data location.
   at org.alfresco.repo.admin.ConfigurationChecker.check(ConfigurationChecker.java:332)
   at org.alfresco.repo.admin.ConfigurationChecker.access$000(ConfigurationChecker.java:68)
   at org.alfresco.repo.admin.ConfigurationChecker$1.execute(ConfigurationChecker.java:180)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:247)
   at org.alfresco.repo.admin.ConfigurationChecker.onBootstrap(ConfigurationChecker.java:184)

14 REPLIES 14

mrogers
Star Contributor
Star Contributor
You need to give more details.   For example what do you mean by "crashes", crashes are unlikely.

You describe replacing the database.    What about the content?   Its that is being complained about leading to the ERROR below.

For Enterprise versions upgrade from 2.1.7 to 3.3.0 works.    I've no idea about community versions although it sounds like others have shared their experiences.

joko71
Confirmed Champ
Confirmed Champ
You need to give more details.   For example what do you mean by "crashes", crashes are unlikely.

You describe replacing the database.    What about the content?   Its that is being complained about leading to the ERROR below.

For Enterprise versions upgrade from 2.1.7 to 3.3.0 works.    I've no idea about community versions although it sounds like others have shared their experiences.
Well, when I said "crashes" I meant we get the error like in the quoted log. Smiley Happy

Of course, it's both content and database.

In the meantime we've been playing with some settings in repository.properties

# Property to enable upgrade from 2.1-A
#V2.1-A.fixes.to.schema=0
V2.1-A.fixes.to.schema=82

and we got a different error:

13:25:03,384 INFO  [STDOUT] 13:25:03,384 INFO  [repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: C:\Jboss\bin\alf_data
13:25:03,400 INFO  [STDOUT] 13:25:03,400 ERROR [web.context.ContextLoader] Context initialization failed
org.alfresco.error.AlfrescoRuntimeException: 02250001 The store 'user://alfrescoUserStore' has a duplicate root node entry.

Maybe there is something wrong with original 2.1 DB & content? Or maybe 3.3 DB is not being deleted correctly so we have duplicate entries? Smiley Happy

joko71
Confirmed Champ
Confirmed Champ
We've made some progress in our effort to migrate from 2.1 to 3.3…

Errors mentioned before were happening because we had two Alfresco DBases on our MySQL by accident. We discovered that and made further progress.

Patches are being applied, but this one

patch.calendarNamespaceUri

with error:

[admin.patch.PatchExecuter]    Applying patch 'patch.calendarNamespaceUri' (Update the Calendar model namespace URI and reindex all calendar objects.).
2011-03-30 13:30:47,710 INFO  [STDOUT] 13:30:47,710 ERROR [admin.patch.PatchExecuter] 02300001 org.springframework.dao.DataIntegrityViolationException: Cannot update namespace as it doesn't exist: com.infoaxon.alfresco.calendar
   at org.alfresco.repo.domain.qname.AbstractQNameDAOImpl.updateNamespace(AbstractQNameDAOImpl.java:144)
   at org.alfresco.repo.admin.patch.impl.CalendarModelUriPatch.applyInternal(CalendarModelUriPatch.java:73)
   at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:416)
   at org.alfresco.repo.admin.patch.AbstractPatch$1$1.execute(AbstractPatch.java:410)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:321)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:228)
   at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:442)
   at org.alfresco.repo.admin.patch.AbstractPatch$1.doWork(AbstractPatch.java:406)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.admin.patch.AbstractPatch.apply(AbstractPatch.java:446)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.applyPatch(PatchServiceImpl.java:297)
   at org.alfresco.repo.admin.patch.PatchServiceImpl.access$200(PatchServiceImpl.java:50)
   at org.alfresco.repo.admin.patch.PatchServiceImpl$2.execute(PatchServiceImpl.java:226)
   at org.alfresco.repo.admin.patch.PatchServiceImpl$2.execute(PatchServiceImpl.java:224)


We found out that this new calendar feature was added to 3.0 Alfresco version. Most probably patch script wrongly assumes the feature in earlier versions.

That bug was solved on 3.3 Enterprise version:
http://issues.alfresco.com/jira/browse/ALF-2819

And someone tried a workaround by adding (or modifying) namespace in CalendarModel.xml:
https://issues.alfresco.com/jira/browse/ETHREEOH-886

next import fails due to com.infoaxon.alfresco.calendar namespace URL not being defined.

so, I added

      <namespace uri="com.infoaxon.alfresco.calendar" prefix="ia"/>
next to
      <namespace uri="http://www.alfresco.org/model/calendar" prefix="ia"/>

in the calendarModel.xml model.

We tried ourselves modifying CalendarModel.xml, but we got the same error as before.

Does anyone have idea how to fix this error and move on with migration? Smiley Happy

joko71
Confirmed Champ
Confirmed Champ
There has been new development in our situation.

Unable to solve "calendar bug" (see previous post) we decided to temporarily comment out that patch and proceed with migration.

All went well until we came to Ibatis SQL insert bug. There is read-only transaction that tries SQL insert or something:

2011-03-31 09:31:16,960 INFO  [STDOUT] 09:31:16,960 INFO  [admin.patch.PatchExecuter] 
=== Applied patch                 ===
ID: patch.convertContentUrls
RESULT:
Content URL conversion completed.
=====================================
2011-03-31 09:31:16,976 INFO  [STDOUT] 09:31:16,976 INFO  [admin.patch.PatchExecuter]
=== Applied patch                 ===
ID: patch.transferServiceFolder
RESULT:
Imported view into bootstrap location: /app:company_home/app:dictionary (workspace://SpacesStore/abb6ce0d-5aa6-11e0-97c4-69bb87980473)
=====================================
2011-03-31 09:31:17,038 INFO  [STDOUT] 09:31:17,038 INFO  [repo.module.ModuleServiceImpl] Found 0 module(s).
2011-03-31 09:31:17,085 INFO  [STDOUT] 09:31:17,085 INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
2011-03-31 09:31:17,757 INFO  [STDOUT] 09:31:17,757 INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
2011-03-31 09:31:18,163 INFO  [STDOUT] 09:31:18,163 ERROR [org.alfresco.fileserver] Error accessing Win32 NetBIOS, check DLL is on the path
2011-03-31 09:31:18,398 INFO  [STDOUT] 09:31:18,398 INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
2011-03-31 09:31:18,632 INFO  [STDOUT] 09:31:18,632 INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
2011-03-31 09:31:18,788 INFO  [STDOUT] 09:31:18,788 INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
2011-03-31 09:31:18,882 INFO  [STDOUT] 09:31:18,882 WARN  [springframework.beans.GenericTypeAwarePropertyDescriptor] Invalid JavaBean property 'blockedSenders' being accessed! Ambiguous write methods found next to actually used [public void org.alfresco.email.server.EmailServer.setBlockedSenders(java.lang.String)]: [public void org.alfresco.email.server.EmailServer.setBlockedSenders(java.util.List)]
2011-03-31 09:31:18,898 INFO  [STDOUT] 09:31:18,898 WARN  [springframework.beans.GenericTypeAwarePropertyDescriptor] Invalid JavaBean property 'allowedSenders' being accessed! Ambiguous write methods found next to actually used [public void org.alfresco.email.server.EmailServer.setAllowedSenders(java.util.List)]: [public void org.alfresco.email.server.EmailServer.setAllowedSenders(java.lang.String)]
2011-03-31 09:31:57,822 INFO  [STDOUT] 09:31:57,791 ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.dao.TransientDataAccessResourceException: SqlMapClient operation; SQL [];  
— The error occurred in alfresco/ibatis/#resource.dialect#/qname-insert-SqlMap.xml. 
— The error occurred while applying a parameter map. 
— Check the alfresco.qname.insert_QName-InlineParameterMap. 
— Check the statement (update failed). 
— Cause: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:  
— The error occurred in alfresco/ibatis/#resource.dialect#/qname-insert-SqlMap.xml. 
— The error occurred while applying a parameter map. 
— Check the alfresco.qname.insert_QName-InlineParameterMap. 
— Check the statement (update failed). 
— Cause: java.sql.SQLException: Connection is read-only. Queries leading to data modification are not allowed
   at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:107)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
   at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203)
   at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:364)
   at org.alfresco.repo.domain.qname.ibatis.QNameDAOImpl.createQNameEntity(QNameDAOImpl.java:112)

We googled and found out that this bug has been solved for Enterprise version.

Then we decided to try 2.1 -> 3.2 -> 3.3 migration. Patch installation went well, "calendar bug" was not seen, but Ibatis SQL insert remained.

Is there a solution for that bug in 3.3 Community version? Smiley Happy

joko71
Confirmed Champ
Confirmed Champ
We're still struggling with migration, but for now just one simple question:

Let's say that on surface all patches were installed, but DB schema according to log remains the same (the old 2.1 schema). What could go wrong?

mrogers
Star Contributor
Star Contributor
The schemas are incompatible between 2.1 and 3.3.    Alfresco will not work.

joko71
Confirmed Champ
Confirmed Champ
The schemas are incompatible between 2.1 and 3.3.    Alfresco will not work.
I said that patches (at least on surface) seem to be installed correctly. We have some other difficulties like not being able to log in into Alfresco web client, but our custom applications on top of Alfresco are working (all standard operations with repository using 3.2 Java libraries). But DB schema is according to log 2.1. Seems like DB migration is finished, but lacks final step of changing DB schema name from 2.1 to 3.2.

mrogers
Star Contributor
Star Contributor
What are you seeing in your log file?   What's the startup message.

After the patches run the "current repository descriptor" is updated.   It is the patch process that is the important thing.   If all patches run then that's O.K.

joko71
Confirmed Champ
Confirmed Champ
If we become dead sure one day that patch process is complete, is there a way to manually update current repository descriptor?