Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Vitaliy Koshelenko
Liferay migration from 5.2.3 to 6.1
July 23, 2012 5:34 AM
Answer

Vitaliy Koshelenko

Rank: Expert

Posts: 284

Join Date: March 25, 2011

Recent Posts

Hi, all.

I need to migrate the existing portal (version 5.2.3) to the 6.1 version.
Where can I find step-by-step instruction how to do it ? Which problems can occur during this migration ?

Thanks, Vitaliy
Amit Doshi
RE: Liferay migration from 5.2.3 to 6.1
July 23, 2012 6:28 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi Vitaliy,

One of my friend has represented in Blog in a very nice way.

Step by Step all the thing is mentioned.

Please check this link.

Thanks & Regards,
Amit Doshi
Vitaliy Koshelenko
RE: Liferay migration from 5.2.3 to 6.1
July 23, 2012 6:52 AM
Answer

Vitaliy Koshelenko

Rank: Expert

Posts: 284

Join Date: March 25, 2011

Recent Posts

Thanks for your reply, I'll check it.
Vitaliy Koshelenko
RE: Liferay migration from 5.2.3 to 6.1
July 24, 2012 8:22 AM
Answer

Vitaliy Koshelenko

Rank: Expert

Posts: 284

Join Date: March 25, 2011

Recent Posts

Has anybody else faced with this issue?
Currently I'm trying to upgrade portal to 6.0 version... I have pointed Liferay 6.0.6 instance to MySQL database (which was used by v5.2.3), and I always get errors during UpgradeProcess at the startup like:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '24575' for key 'PRIMARY'
(not only for this ID, if I remove it - I get the similar error for other ones). It seems, that Liferay tries to copy the entities which are already existing and save them again into DB tables (like TagsVocabulary, TagsAsset, TagsEntry etc.)
Can anybody help me with that?

Thanks,
VItaliy K.
Vitaliy Koshelenko
RE: Liferay migration from 5.2.3 to 6.1
July 25, 2012 3:35 AM
Answer

Vitaliy Koshelenko

Rank: Expert

Posts: 284

Join Date: March 25, 2011

Recent Posts

I have checked out the source code - in the UpgradeAsset class there is code like:

 1            ps = con.prepareStatement("select * from TagsAsset");
 2            rs = ps.executeQuery();
 3            while (rs.next()) {
 4                long assetId = rs.getLong("assetId");
 5                long groupId = rs.getLong("groupId");
 6                // .. other fields
 7                addEntry(
 8                    assetId, groupId, companyId, userId, userName, createDate,
 9                    modifiedDate, classNameId, classPK, visible, startDate,
10                    endDate, publishDate, expirationDate, mimeType, title,
11                    description, summary, url, height, width, priority,
12                    viewCount);
13            }

..so Liferay reads all the records from DB, and then tries to add each record to database again (but fails because of DuplicateKey exception).
Can anybody explain, why Liferay does this and how to suppress this functionality?
Amit Doshi
RE: Liferay migration from 5.2.3 to 6.1
July 25, 2012 3:43 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Hi Vitaliy,

It is one of the basic issues.

It happens generally when you start migration the DB and it stops in between while migration and then you restart the server it will give you "com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '24575' for key 'PRIMARY'" Error.

So for that reason Until the Migration done successfully, Start with 5.2.3 DB once again with fresh copy of DB.

Hope it helps.

Thanks & Regards,
Amit Doshi
Vitaliy Koshelenko
RE: Liferay migration from 5.2.3 to 6.1
July 25, 2012 1:22 PM
Answer

Vitaliy Koshelenko

Rank: Expert

Posts: 284

Join Date: March 25, 2011

Recent Posts

Thanks again, Amit.
I have also found related topic in Administration Guide: https://www.liferay.com/documentation/liferay-portal/6.0/administration/-/ai/upgrading-lifer-4
Regards, Vitaliy
Jack Bakker
RE: Liferay migration from 5.2.3 to 6.1
July 25, 2012 1:26 PM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 840

Join Date: January 3, 2010

Recent Posts

Hi Vitaliy

I think you are upgrading 5.2.3 to 6.0.6 (not 6.1 as your subject here states). Smiles.
Amit Doshi
RE: Liferay migration from 5.2.3 to 6.1
July 25, 2012 11:50 PM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Jack Bakker:
Hi Vitaliy

I think you are upgrading 5.2.3 to 6.0.6 (not 6.1 as your subject here states). Smiles.


Jack:-

You can't directly migrate from 5.2.3 to 6.1, before that you have to migrate it to liferay 6.0 version.

Check this link for more information.

Thanks & Regards,
Amit Doshi
Vitaliy Koshelenko
RE: Liferay migration from 5.2.3 to 6.1
July 26, 2012 5:25 AM
Answer

Vitaliy Koshelenko

Rank: Expert

Posts: 284

Join Date: March 25, 2011

Recent Posts

Hi, Jack

Yes, currently I need to upgrade to 6.0.6 version, and after successful upgrade I'll upgrade to v6.1