留言板

Liferay Migration from 6 to 6.1 with Oracle 11g

thumbnail
Srikanth Reddy,修改在9 年前。

Liferay Migration from 6 to 6.1 with Oracle 11g

New Member 帖子: 24 加入日期: 13-10-22 最近的帖子
Hi All,
I have started migration of Liferay from Liferay 6.0.3 to Liferay 6.1 with Oracle 11g as my prod DB.
While migrating I am getting below Issue .
  059 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.UpgradeProcess_6_1_0
23:51:32,060 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeSchema
23:52:08,762 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeUserName
23:52:28,156 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeAdminPortlets
23:52:29,868 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeBlogs
23:52:30,151 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeCamelCasePortletPreferences
00:22:02,146 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeCountry
00:22:08,145 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeDocumentLibrary
00:23:17,917 INFO  [localhost-startStop-1][Table:155] Starting backup of DLFileVersion to /apps/pr_apps/msat/devserver/migration/server/appserver/liferay6.1/tomcat-7.0.40/temp/temp-db-DLFileVersion-1422404597916
00:23:18,611 INFO  [localhost-startStop-1][Table:189] Finished backup of DLFileVersion to /apps/pr_apps/msat/devserver/migration/server/appserver/liferay6.1/tomcat-7.0.40/temp/temp-db-DLFileVersion-1422404597916 in 694 ms
00:23:20,322 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeExpando
00:23:23,935 INFO  [localhost-startStop-1][UpgradeProcess:175] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeGroup
00:23:24,136 INFO  [localhost-startStop-1][Table:155] Starting backup of Group_ to /apps/pr_apps/msat/devserver/migration/server/appserver/liferay6.1/tomcat-7.0.40/temp/temp-db-Group_-1422404604136
00:23:25,401 INFO  [localhost-startStop-1][Table:189] Finished backup of Group_ to /apps/pr_apps/msat/devserver/migration/server/appserver/liferay6.1/tomcat-7.0.40/temp/temp-db-Group_-1422404604136 in 1265 ms
00:23:26,865 ERROR [localhost-startStop-1][MainServlet:217] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: ORA-01438: value larger than specified precision allowed for this column

com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: ORA-01438: value larger than specified precision allowed for this column

        at com.liferay.portal.events.StartupAction.run(StartupAction.java:56)
        at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1300)
        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:1280)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5407)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:657)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1636)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: ORA-01438: value larger than specified precision allowed for this column

        at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:181)
        at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:113)
        at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:66)
        at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:46)
        at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:138)
        at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:61)
        at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:143)
        at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:119)
        at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
        at com.liferay.portal.events.StartupAction.run(StartupAction.java:50)
        ... 19 more
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.BatchUpdateException: ORA-01438: value larger than specified precision allowed for this column


Something I want to know
1) Why am I getting this issue when my DB both in liferay 6 & liferay 6.1 is same (Oracle 11g)?
2) How to overcome this issue and migrate the portal successfully ?
3) Is their any document from Liferay Team on the migration ?. I see their are many generalize document ,but nothing on the issues which arise while migration.

Thanks
Shoda
thumbnail
Srikanth Reddy,修改在9 年前。

RE: Liferay Migration from 6 to 6.1 with Oracle 11g

New Member 帖子: 24 加入日期: 13-10-22 最近的帖子
Finally was able to get the Migration done successfully .
Issue was with the Ojdbc Jar file is used while migration .

Liferay 6.0.3 ee
Oracle 11g Db & ojdbc14.jar file : Had no problem in connecting and working .


Liferay 6.1.3 ee
Oracle 11g Db & ojdbc14.jar file : was getting issue while upgrading from Liferay 6.0.3 ee to 6.1.3 ee
Need to replace the jar with ojdbc6.jar file and things were smooth .

Was able to migrate and over come above exception while migration .

Thanks
Shoda
thumbnail
Bhaskar Kumar,修改在8 年前。

RE: Liferay Migration from 6 to 6.1 with Oracle 11g

Junior Member 帖子: 38 加入日期: 13-5-22 最近的帖子
Hi Srikanth ,

I am having same problem , but i need to migrate liferay 6.1 to 6.2 with oracle12c database in prod environment , now it is liferay 6.1 with oracle11g.
while doing migration is there any change of data corruption of previous database oracle11g.
can you provide me steps for database migration and portlet migration (6.1 to 6.2). i am using maven project.
thumbnail
Srikanth Reddy,修改在8 年前。

RE: Liferay Migration from 6 to 6.1 with Oracle 11g

New Member 帖子: 24 加入日期: 13-10-22 最近的帖子
MIGRATIONB DOCUMENT from Liferay 6.0.x to 6.1.x

1. Download and Unzip Liferay 6.1EE bundle in Linux box.
2. Copy complete data folder as is from Liferay 6.0.x bundle to Liferay 6.1 bundle.
3. Take backup of your database that Liferay 6.0.x points to. Essentially you are pointing your new Liferay 6.1 to old database.
4. Drop portal-ext.properties from Liferay 6.0.x to Liferay 6.1 (in ROOT/WEB-INF/classes of course).
5. Start Liferay 6.1 and it will automatically detect that it needs to upgrade the database and will run the upgrade scripts.
In case of a error Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portlet.documentlibrary.NoSuchFileException:
We can overcome it with the below logic
This is the download link to a verifier JAR that we built for use in a number of migration projects from 5.1.0+ to 6.1.2 GA3:

http://downloads.smartforms.myoffice24x7.com/latest/document-verifier.jar

Put the following into portal-ext.properties:

verify.processes=com.myoffice24x7.liferay.portal.verify.VerifyProcessSuite
verify.dl.file.name.normalization.enabled=true
verify.dl.file.name.normalization.max.list.page.size=50
layout.import.dl.file.name.normalization.enabled=true



In case there is any exception, you will have to restore the backup of old database and start all over again.
• As User were taken from Production. User "xxxxxxxxxxxxx" is not an Admin and the User login expired.
To reset such things:
Please edit USER_ table and change below attributes for User ="xxxxxxxxxxxx"
password_='new password'
passwordEncrypted=0
modifiedDate="Currrent Date "



update User_ set password_='test',passwordEncrypted=0,passwordModifiedDate=Current_Date where screenName='xxxxxxxxxx';

• ECJ jar issue in Linux.
Just downloaded latest new version of ant 1.8 version and set it to ANT_HOME=
Or Provide the ECJ jar ant dir/lib

• Now a new Issue with JRE 1.7 ,As new server and sdk uses JDK1.7 to compile the classes ,So need to update Linux Box JDK from 1.6 to 1.7

• Once migration is completed, validation process is started which fails at some point of time and shuts down JVM.
To avoid repeating of DB migration, we have to execute below query and start working on new version
update Release_ set buildNumber=6130,state_=0 where releaseId=1;

6. Check whether you get all your Users and Organizations under "Users & Organizations" in control panel. If not then run - Control Panel >> Server Administration >> Re-Index all Search Indexes
thumbnail
Srikanth Reddy,修改在8 年前。

RE: Liferay Migration from 6 to 6.1 with Oracle 11g

New Member 帖子: 24 加入日期: 13-10-22 最近的帖子
I think this will help you in deleting all the Tables and its depended object.
In oracle run this script to clear you Table and data only ,but not the schema


Delete the entire Tables with dependent objects



DECLARE
l_count NUMBER;
l_cascade VARCHAR2(20);
BEGIN
<< dependency_failure_loop >>
FOR i IN 1 .. 5 LOOP
EXIT dependency_failure_loop WHEN l_count = 0;
l_count := 0;

FOR cur_rec IN (SELECT object_name, object_type
FROM user_objects) LOOP
BEGIN
l_count := l_count + 1;
l_cascade := NULL;
IF cur_rec.object_type = 'TABLE' THEN
l_cascade := ' CASCADE CONSTRAINTS';
END IF;
EXECUTE IMMEDIATE 'DROP ' || cur_rec.object_type || ' "' || cur_rec.object_name || '"' || l_cascade;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
END LOOP;
-- Comment out the following line if you are pre-10g, or want to preserve the recyclebin contents.
EXECUTE IMMEDIATE 'PURGE RECYCLEBIN';
DBMS_OUTPUT.put_line('Pass: ' || i || ' Drops: ' || l_count);
END LOOP;
END;
/