RE: Upgrade from 6.2 to 7

Bhavin Panchani, modified 7 Years ago. New Member Posts: 2 Join Date: 1/22/15 Recent Posts

I am working on upgrade from liferay 6.2 to 7. I am getting below error while running upgrade:executeAll

 


INFO - Completed com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping#upgradeTemplatesAndAddTemplateVersions in 31 ms
INFO - Failed upgrade process com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping in 1216ms

Failed upgrade process for module com.liferay.dynamic.data.mapping.service:
java.lang.RuntimeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException
    at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfosRunnable.run(ReleaseManagerOSGiCommands.java:564)
    at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:106)
    at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.executeUpgradeInfos(ReleaseManagerOSGiCommands.java:337)
    at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.doExecute(ReleaseManagerOSGiCommands.java:280)
    at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.executeAll(ReleaseManagerOSGiCommands.java:300)
    at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.executeAll(ReleaseManagerOSGiCommands.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
    at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
    at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
    at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
    at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
    at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
    at org.apache.felix.gogo.shell.Console.run(Console.java:62)
    at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
    at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137)
    at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
    at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
    at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
    at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
    at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
    at org.eclipse.equinox.console.telnet.TelnetConnection.run(TelnetConnection.java:94)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException
    at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
    at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:129)
    at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfosRunnable.run(ReleaseManagerOSGiCommands.java:539)
    ... 33 more
Caused by: java.lang.NullPointerException
    at com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping.getTemplateResourceClassNameId(UpgradeDynamicDataMapping.java:512)
    at com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping.upgradeTemplatesAndAddTemplateVersions(UpgradeDynamicDataMapping.java:1318)
    at com.liferay.dynamic.data.mapping.internal.upgrade.v1_0_0.UpgradeDynamicDataMapping.doUpgrade(UpgradeDynamicDataMapping.java:254)
    at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
    ... 35 more
INFO - Upgrading com.liferay.asset.browser.web.internal.upgrade.AssetBrowserWebUpgrade$1
INFO - Starting com.liferay.portal.kernel.upgrade.BaseUpgradePortletId#upgradeInstanceablePortletIds
INFO - Completed com.liferay.portal.kernel.upgrade.BaseUpgradePortletId#upgradeInstanceablePortletIds in 71 ms
INFO - Starting com.liferay.portal.kernel.upgrade.BaseUpgradePortletId#upgradeUninstanceablePortletIds


How do I fix this error?
 

thumbnail
Olaf Kock, modified 7 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Bhavin Panchani:

I am working on upgrade from liferay 6.2 to 7. I am getting below error while running upgrade:executeAll

Low hanging fruit upfront: Please share the minor versions that you use as well.

It's especially critical to always upgrade to the latest available target version, as the upgrade routines might also contain fixes.

 

 

 

 

Bhavin Panchani, modified 7 Years ago. New Member Posts: 2 Join Date: 1/22/15 Recent Posts

Thanks Olaf.

I am able to solve the issue.

I have deleted entries in DDMTemplate table for which classPK value doesn't exist in DDMStructure table. 

Thanks,
Bhavin Panchani

thumbnail
Minhchau Dang, modified 7 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts

My reply was lost in yesterday's site outage, but we'd encountered the problem as part of our release preparation for 7.1, and we documented it in LPS-82417.

To summarize the issue, one of your templates was orphaned (its structure must have been deleted some how, possibly during 6.1 when Liferay did not have any safeguards against it), and deleting that orphaned template from the database is one way to resolve the issue and allow your upgrade to proceed.