Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Chris Parsons
Upgrade from 5.2.3 to 6.1.1
August 10, 2012 4:21 AM
Answer

Chris Parsons

Rank: New Member

Posts: 6

Join Date: March 25, 2009

Recent Posts

Trying to upgrade my 5.2.3. installation to 6.1.1 - and am having a few problems!

Looks like I am not the only one - one of the posts suggested following the standard procedure (?), which seems to suggest the db (MySQL) will be updated
automatically?

Anyway, to cut a long story short, I have cut down my portal-ext.properties to have JUST the db credentials and restored a backup of the 5.2.3 db and started 6.1.1.
and get the following...

10:55:57,769 INFO [pool-2-thread-1][DialectDetector:71] Determine dialect for MySQL 5
10:55:57,814 INFO [pool-2-thread-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
10:56:22,629 INFO [pool-2-thread-1][BaseDB:455] Database does not support case sensitive queries
10:56:22,829 INFO [pool-2-thread-1][UpgradeProcess:207] Upgrading com.liferay.portal.upgrade.UpgradeProcess_6_0_0
10:56:22,829 INFO [pool-2-thread-1][UpgradeProcess:207] Upgrading com.liferay.portal.upgrade.v6_0_0.UpgradeSchema
10:56:22,844 WARN [pool-2-thread-1][BaseDB:428] Table 'assetcategory' already exists: create table AssetCategory ( uuid_ varchar(75) null, categoryId bigint not null primary key, groupId bigint, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, parentCategoryId bigint, leftCategoryId bigint, rightCategoryId bigint, name varchar(75) null, title longtext null, vocabularyId bigint) engine InnoDB;

10:56:22,849 WARN [pool-2-thread-1][BaseDB:428] Table 'assetcategoryproperty' already exists: create table AssetCategoryProperty ( categoryPropertyId bigint not null primary key, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, categoryId bigint, key_ varchar(75) null, value varchar(75) null) engine InnoDB;

10:56:22,849 WARN [pool-2-thread-1][BaseDB:428] Table 'assetentries_assetcategories' already exists: create table AssetEntries_AssetCategories ( entryId bigint not null, categoryId bigint not null, primary key (entryId, categoryId)) engine InnoDB;

10:56:22,854 WARN [pool-2-thread-1][BaseDB:428] Table 'assetentries_assettags' already exists: create table AssetEntries_AssetTags ( entryId bigint not null, tagId bigint not null, primary key (entryId, tagId)) engine InnoDB;

10:56:22,859 WARN [pool-2-thread-1][BaseDB:428] Table 'assetentry' already exists: create table AssetEntry ( entryId bigint not null primary key, groupId bigint, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, classNameId bigint, classPK bigint, visible tinyint, startDate datetime null, endDate datetime null, publishDate datetime null, expirationDate datetime null, mimeType varchar(75) null, title varchar(255) null, description longtext null, summary longtext null, url longtext null, height integer, width integer, priority double, viewCount integer) engine InnoDB;

10:56:22,859 WARN [pool-2-thread-1][BaseDB:428] Table 'assettag' already exists: create table AssetTag ( tagId bigint not null primary key, groupId bigint, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, name varchar(75) null, assetCount integer) engine InnoDB;

10:56:22,864 WARN [pool-2-thread-1][BaseDB:428] Table 'assettagproperty' already exists: create table AssetTagProperty ( tagPropertyId bigint not null primary key, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, tagId bigint, key_ varchar(75) null, value varchar(255) null) engine InnoDB;

10:56:22,869 WARN [pool-2-thread-1][BaseDB:428] Table 'assettagstats' already exists: create table AssetTagStats ( tagStatsId bigint not null primary key, tagId bigint, classNameId bigint, assetCount integer) engine InnoDB;

10:56:22,869 WARN [pool-2-thread-1][BaseDB:428] Table 'assetvocabulary' already exists: create table AssetVocabulary ( uuid_ varchar(75) null, vocabularyId bigint not null primary key, groupId bigint, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, name varchar(75) null, title longtext null, description longtext null, settings_ longtext null) engine InnoDB;

10:56:27,954 WARN [pool-2-thread-1][BaseDB:428] Table 'layoutprototype' already exists: create table LayoutPrototype ( layoutPrototypeId bigint not null primary key, companyId bigint, name longtext null, description longtext null, settings_ longtext null, active_ tinyint) engine InnoDB;

10:56:28,349 WARN [pool-2-thread-1][BaseDB:428] Table 'layoutsetprototype' already exists: create table LayoutSetPrototype ( layoutSetPrototypeId bigint not null primary key, companyId bigint, name longtext null, description longtext null, settings_ longtext null, active_ tinyint) engine InnoDB;

10:56:28,354 WARN [pool-2-thread-1][BaseDB:428] Table 'lock_' already exists: create table Lock_ ( uuid_ varchar(75) null, lockId bigint not null primary key, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, className varchar(75) null, key_ varchar(200) null, owner varchar(75) null, inheritable tinyint, expirationDate datetime null) engine InnoDB;

10:56:33,449 WARN [pool-2-thread-1][BaseDB:428] Table 'usergroupgrouprole' already exists: create table UserGroupGroupRole ( userGroupId bigint not null, groupId bigint not null, roleId bigint not null, primary key (userGroupId, groupId, roleId)) engine InnoDB;

10:56:34,349 WARN [pool-2-thread-1][BaseDB:428] Table 'workflowdefinitionlink' already exists: create table WorkflowDefinitionLink ( workflowDefinitionLinkId bigint not null primary key, groupId bigint, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, classNameId bigint, workflowDefinitionName varchar(75) null, workflowDefinitionVersion integer) engine InnoDB;

10:56:34,354 WARN [pool-2-thread-1][BaseDB:428] Table 'workflowinstancelink' already exists: create table WorkflowInstanceLink ( workflowInstanceLinkId bigint not null primary key, groupId bigint, companyId bigint, userId bigint, userName varchar(75) null, createDate datetime null, modifiedDate datetime null, classNameId bigint, classPK bigint, workflowInstanceId bigint) engine InnoDB;

10:56:34,359 INFO [pool-2-thread-1][UpgradeProcess:207] Upgrading com.liferay.portal.upgrade.v6_0_0.UpgradeAsset
10:56:34,444 ERROR [pool-2-thread-1][MainServlet:217] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '10743' for key 'PRIMARY'
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '10743' for key 'PRIMARY'
at com.liferay.portal.events.StartupAction.run(StartupAction.java:58)
at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1306)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:214)
at javax.servlet.GenericServlet.init(GenericServlet.java:160)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '10743' for key 'PRIMARY'
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213)
at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:103)
at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:56)
at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:36)
at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:130)
at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:48)
at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:129)
at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
... 20 more
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '10743' for key 'PRIMARY'
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:227)
at com.liferay.portal.upgrade.UpgradeProcess_6_0_0.doUpgrade(UpgradeProcess_6_0_0.java:47)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
... 28 more
Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '10743' for key 'PRIMARY'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1585)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1500)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1485)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at com.liferay.portal.upgrade.v6_0_0.UpgradeAsset.addEntry(UpgradeAsset.java:137)
at com.liferay.portal.upgrade.v6_0_0.UpgradeAsset.updateAssetEntries(UpgradeAsset.java:473)
at com.liferay.portal.upgrade.v6_0_0.UpgradeAsset.doUpgrade(UpgradeAsset.java:392)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
... 31 more


Looks like some tables are being created and then the process fails when trying to upgrade?

Anyone got any ideas?

I have seen some posts relating to adding;

permissions.checker=com.liferay.portal.security.permission.SimplePermissionChecker
permissions.user.check.algorithm=5
permissions.view.dynamic.inheritance=false

into portal-ext.properties and have tried this, got exactly the same result

Any ideas what I can try next?

Thanks

Chris Parsons
Amine Bousta
RE: Upgrade from 5.2.3 to 6.1.1
August 13, 2012 4:19 AM
Answer

Amine Bousta

Rank: New Member

Posts: 4

Join Date: August 10, 2012

Recent Posts

Hi Chris,

First of all, the upgrade process is not straightforward for a lot of people. You're not the only one !

First step: try to upgrade from 5.2. to 6.0
Depending on the extensions you made in your 5.2.3 version (themes ? Ext ? hooks ? portlets ? data model and services generated by service builder ?) you're going to spend days on this.
When it's ok, be sure to test absolutely everything before trying to upgrade from 6.0 to 6.1
Then this second step is harder again !
APIs have changed and the standard upgrade process doesn't seem to work. I'm trying to do that one too and it's not easy.

Yes, the db will upgrade automatically.
Give a look to the portal.properties file and you will see a property called "upgrade.processes".
The StartupAction will look at this property in order to launch the right upgrade scripts depending on the last working version.
The last working version is the number stored in your "Release_" table.
If you try to launch a new Liferay version on an old database, it looks at this number in your database, then executes all of the scripts declared by your upgrade.processes property (please check if you didn't override this prop in your portal-ext.properties before launching your new LR)


Before upgrading you should ask to yourself if it worthes it.
Do your 5.2.3 site REALLY needs the new functionalities of the 6.0 and 6.1 ?
Because you're going to spend time, believe me...

Good luck and please keep telling us about your progress emoticon
Brian Kim
RE: Upgrade from 5.2.3 to 6.1.1
August 10, 2012 5:48 PM
Answer

Brian Kim

LIFERAY STAFF

Rank: Expert

Posts: 319

Join Date: August 16, 2004

Recent Posts

Another option is to just start with Liferay 6.1 GA2 and then migrate your apps and data into it. I know this isn't ideal, but you would benefit from things like Algorithm 6, which will increase the performance of your portal, as opposed to upgrading your existing portal to 6.1 GA2 and then using Algorithm 5.

Migration of your apps would require some refactoring of course. Migration of your data might require that you create some Java scripts to call Liferay's APIs to insert the data (never use straight SQL queries to insert data into your DB as there are a lot of dependencies to other tables that you might miss).

Best of luck either way.
Peter B West
RE: Upgrade from 5.2.3 to 6.1.1
August 11, 2012 2:35 AM
Answer

Peter B West

Rank: Junior Member

Posts: 57

Join Date: March 23, 2009

Recent Posts

Chris,

Didi you restore your data directory? With tomcat installs, there are 'data' and 'deploy' directories at the same level as the tomcat directory. When you restored the db, did you also restore 'data'?

What restore method did you use for your database? Didi you restore the mysql 'data' directory?
Hitoshi Ozawa
RE: Upgrade from 5.2.3 to 6.1.1
August 11, 2012 3:02 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

First of all, you can't directly upgrade from 5.2.3 to 6.1.1. You'll need to upgrade to 6.0.6 and then to 6.1.1.
Amine Bousta
RE: Upgrade from 5.2.3 to 6.1.1
August 13, 2012 4:23 AM
Answer

Amine Bousta

Rank: New Member

Posts: 4

Join Date: August 10, 2012

Recent Posts

You absolutely right that's what I wanted to say in the very beginning of my post but this sentence disappeared.

I edited this thanks

Like you say
Step 1 : from 5.2.3 to 6.0.6 (it's a difficult migration that I achieved twice but spent days on this)
Step 2 : from 6.0.6 to 6.1.1 (I find it even harder depending on the extensions you made and didn't finish yet)

That's why you have to question yourself if you really need the functionnalities of the next version after each step.
Amine Bousta
RE: Upgrade from 5.2.3 to 6.1.1
August 13, 2012 4:56 AM
Answer

Amine Bousta

Rank: New Member

Posts: 4

Join Date: August 10, 2012

Recent Posts

@Brian Kim:
I think you can use the algo 6 as well after an upgrade.
But if you do it from 5.2 to 6.0 then you'll have to write a script that uses Liferay's API to re-publish all of your existing doc library file entries and web contents.
That updates the PermissionResource table with new entries and then algo 6 can work.
(Or you may customize the upgrade process instead of writing a script)


I'm interested by your second option of migrating data from 5.2.3 to 6.1.1 by using Liferay's API.
How do you manage to do a Java script that reads the old data and updated it with the Liferay API ?
Because you need the 5.2.3 version of the API to read it and the 6.1.1 version to update it.
Do you deal with two classloaders? two LR instances ? or a kind of export/import file ?

Or may be you read with straight SQL but update with LR Api ?
But in this case I can't see a real difference between doing that and fixing/extending the upgrade process of LR, can you ?

Regards