« Back to Upgrade Instructions

Upgrade Instructions from 4.3.1 to 5.2.3

Introduction #

We have clients using Liferay portal 4.3.x for their websites. They have developed themes and portlets in the Ext. Now it is good time to Liferay portal 5.2.x. The migration would cover three parts: data, repository, themes and portlets. The data includes a lot of journal articles and pages; themes and portlets have to be migrated to the Plugins SDK. This article will discuss processes - how to upgrade and to migrate Liferay portal from 4.3.x to 5.2.x successfully.

Overview #

In the 4.3.x, all portlets and themes are developed in the extension environment. Thus the portlets and themes have short names. In the 5.2.x, all portlets and themes are moved to the Plugins SDK environment. Therefore, the portlets and themes have long names.

Why upgrade? #

Reasons include, but are not limited to, the following:

  • Enterprise support – 5.1 or above has enterprise edition; better support;
  • Better performance
  • New Web 2.0 features
  • New standard JSR-286

What're challenges? #

Reasons include, but are not limited to, the following:

  • Standards from JSR-168 to JSR-286
  • Data upgrade (users, groups, pages and content)
  • CR repository upgrade
  • Theme (Look and feel) migration – framework changes
    • move from ext to plugins SDK – no options
  • Portlets migration – framework changes
    • move from ext to plugins SDK (better option)
    • move from Liferay struts to generic struts (no option in Plugins SDK)
    • Or use other frameworks like: Spring MVC, Icefaces (JSF), Struts 2, etc.

Data Migration #

Brief description

  1. Preparation
    1. clean Liferay Portal bundle (5.2.x) – remove sample data;
    2. dump data from source server (Liferay 4.3.x)
    3. import data to target database server (suppose that database name: knovel, port no. 3306, user name / password: knovel/knovel)
    4. specify database connection and permission algorithm (must be 2)
permissions.user.check.algorithm=2

jdbc.default.driverClassName=com.mysql.jdbc.Driver

jdbc.default.url=jdbc:mysql://localhost/book?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false

jdbc.default.username=book

jdbc.default.password=book

session.shared.attributes=org.apache.struts.action.LOCALE,COMPANY_,USER_,LIFERAY_SHARED_,KNOVEL_LIFERAY_SHARED_

session.enable.url.with.session.id=false

live.users.enabled=true
  1. Start Portal – let portal do upgrade processes.
    1. Create an account on fly, and take note about the screen name ($screenName), email address ($emailAddress) and password ($password).

e.g., screen name "jonas", email address “jonas@cignex.com”, and password "81hKYSoO";

  1. Stop the Portal
    1. Change Release No.; for example:
update Release_ set buildnumber='5203', modifieddate=now(), verified = '1' where buildnumber='4301';
    1. Find $userId for default user "$screenName"

select UserId, screenName, password_, active_ from User_ where screeeName="$screenName";

    1. Find $roleId for the role "Administrator"
select * from Role_ where name="Administrator";
update the role of default user “jonas” to "Administrator"
update Users_Roles set roleId="$roleId" where userId="$userId";
  1. Clean Liferay portal bundle
    1. Clean legacy portlets in the page
update Layout set typeSettings = replace ( typeSettings, 'state-max=86,', '');

update Layout set typeSettings = replace ( typeSettings, 'state-max=88,', '');
    1. Update themes name
update Layout set themeId ='book_mktg_secondary_WAR_book_mktgtheme' where themeId='book_mktg_secondary';

update Layout set themeId ='book_mktg_popup_WAR_book_mktgtheme' where themeId='book_mktg_popup';

update Layout set themeId ='book_mktg_alternate_WAR_book_mktgtheme' where themeId='book_mktg_alternate';

update Layout set themeId ='book_mktg_WAR_book_mktgtheme' where themeId='book_mktg';

update Layout set themeId ='classic' where themeId='brochure';
    1. Update portlets name: Update portlets name in pages with long name. For example, in the Ext, we have portlet name CONTENT_DISPLAY. Now it should CONTENT_DISPLAY_WAR_${plugin.name}.
  1. Restart the portal
0 Attachments
30434 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments