Upgrade Alfresco from 3.4 to 4.0x

Posted: December 16, 2011 in Alfresco
Tags: , , , , , , , ,

Alfresco has recently released the Alfresco 4.0 version, and also came up with nightly build packs such as 4.0.b, 4.0.c. This informative article will be used for those users who are planning to upgrade Alfresco 3.4 to 4.0.

Alfresco has released the newer version with POSTGRESQL database, where the older versions used MYSQL database. So, in the future releases, Alfresco might go with POSTGRESQL. Instead of using the POSTGRESQL, the users still have the facility of using existing database installed in their machines such as MySql, Oracle, etc.

This upgrade procedure uses existing MYSQL database (instead of migrating the whole database to POSTGRESQL), by pointing the Alfresco installation to the MYSQL database. The upgrade from 3.4 to the higher versions like 4.0b will not work. However, applying a patch before the upgrade will help in completing the process successfully.

The following is the procedure for upgrading from 3.4 to 4.0b.

  1. Stop the Alfresco server.
  2. Keep the MySql server up and running, as we are going to use this as the database for 4.0 installation.
  3. Download ALFRESCO COMMUNITY EDITION 4.0.a, and install in the machine which has 3.4 is installed.
  4. At the time of installation, give the following details:
    driver:      org.gjt.mm.mysql.Driver
    username: alfresco
    password: root
    name:      alfresco
    url:           jdbc:mysql://localhost:3306/alfresco
  5. After the installation is complete, Copy the contentstore and contentstore.deleted folders in alf_data folder of C:\Alfresco3.4 to C:\Alfresco4.0. 
  6. Now, do the following changes in alfresco-global.properties file.
    1. Make sure that the "dir.root" location is pointing to the correct location where the alf_data is stored. For example, dir.root=C:/Alfresco4.0/alf_data.
    2. Add the following line at the end of the file, to re-index the content.
    3. Add the following line at the end of the file, to set the indexing system as LUCENE. (Lucene is the indexing system for versions prior to 4.0)
    4. Comment out the following lines
    5.                ### Solr indexing ##
    6. Save the file.
  7. Place the MySql connector in tomcat/lib folder.
  8. Download the patch-ALF-11029-context.xml file from here, and place the file into <tomcat>/shared/classes/alfresco/extension.
  9. Start the Alfresco instance.
  10. If any errors appear, check the log file.
  11. Once the restart is done properly, and after the lucene indexes folder is created in the alf_data folder, remove the above line index.recovery.mode=FULL in alfresco-global.properties, to ensure that the indexing will not be done every time when the alfresco server is restarted.
  12. If the application is not deployed properly, and if the log file says something related indexing MPEG extension, then search for the file patch-services-context.xml, and replace the value of reindex to false for mpeg.
  13. Restart the system.

Verify whether all the data (Sites, content, etc..) is accessible through Alfresco Explorer and Share or not.

Comments are welcome. Please share your views.

  1. India Tinlin says:

    Hello Web Admin, I noticed that your On-Page SEO is is missing a few factors, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword….wait there’s even more Now what if i told you there was a simple WordPress plugin that does all the On-Page SEO, and automatically for you? That’s right AUTOMATICALLY, just watch this 4minute video for more information at. WordPress Seo Plugin

  2. mb says:

    i have followed the steps. however, i didn’t know where to put the patch-ALF-11029-context.xml. now, i am getting a login error “The remote server may be unavailable or your authentication details have not been recognized.” any ideas?

  3. mb says:

    thank you for the reply. i got the same login error as before.

    here are the details. i uninstalled everything from my test server and deleted the alfresco folders. i installed 3.4.d and created a test site and test user. i stopped alfrescoTomcat service but left alfrescoMysql service running. i installed 4.0.d (not version A, is this the problem?). i did an advanced install and used the sql details that you provided. i modified the alfresco global properties file as you indicated and then i copied the mysql connector file from 3.4.d installation folder into the 4.0.d folder. i placed the patch-alf…xml file into the folder that you indicated. i started the alfrescoTomcat service (using services.msc, not the new alfresco management tool). then attempted to login with the same error as before. i’m stumped.

  4. Kk says:

    According to my analysis, you might have been stuck by any of the following:
    1. Wrong user name / password
    2. You have not replaced the files present in /shared/classes/alfrescoextension, and /shared/classes/alfrescowebextension folders( these have files like web-client-custom-config.xml) which are there in your older version of alfresco.
    3. Have you checked the log? What its saying? If possible, please post ONLY THE ERROR CONTENT in the log, so that we can look further.

  5. mb says:

    1) i don’t think it is a password issue because when i stop alfresco4service and start the 3.4 service, i authenticate successfully.

    2) i copied all of the contents of those two subfolders (under /shared/classes/alfresco/) from the 3.4 install folder to the 4.0 install folder. same login error.

    3) this line from the logs seems to be the problem

    SEVERE: Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextLoaderListener

    org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [alfresco/module/org.alfresco.module.quickr/context/lotus.properties] cannot be opened because it does not exist

    thank you so much for your time.

    • Jamie says:

      I’m having similar symptoms upgrading from community 3.4.d to 4.0.d. I’ve completed each step above and got the login symptom, then updated the /shared/classes/alfresco/) from the 3.4 install folder to the 4.0 install folder and get the same login error.

      This appears in catalina.out:

      [alfresco/module/org.alfresco.module.quickr/context/lotus.properties] cannot be opened because it does not exist



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s