-
Type:
Regression Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.2.0 CE M4
-
Fix Version/s: 6.2.0 CE M4
-
Component/s: Core Infrastructure, Core Infrastructure > Upgrade Framework
-
Environment:Tomcat 7 + Oracle 11gR2. Portal 6.2.x GIT ID: 6b7defb818ca7be926207855a141e3b30e5898f4.
-
Story Points:6
-
Fix Priority:4
-
Git Pull Request:
Phenomenon
While upgrading from 6.0.6 to current trunk (6.2) and the process starts to execute com.liferay.portal.upgrade.v6_2_0.UpgradeJournal the following exception occurs and the portal is terminated thereafter.
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:181) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:195) at com.liferay.portal.upgrade.UpgradeProcess_6_2_0.doUpgrade(UpgradeProcess_6_2_0.java:55) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:178) ... 28 more Caused by: java.lang.NullPointerException at com.liferay.portal.xml.ElementImpl.remove(ElementImpl.java:445) at com.liferay.portlet.journal.util.JournalConverterUtil.updateXSDDynamicElement(JournalConverterUtil.java:529) at com.liferay.portlet.journal.util.JournalConverterUtil.getDDMXSD(JournalConverterUtil.java:98) at com.liferay.portal.upgrade.v6_2_0.UpgradeJournal.addDDMStructure(UpgradeJournal.java:94) at com.liferay.portal.upgrade.v6_2_0.UpgradeJournal.addDDMStructure(UpgradeJournal.java:118) at com.liferay.portal.upgrade.v6_2_0.UpgradeJournal.updateStructures(UpgradeJournal.java:323) at com.liferay.portal.upgrade.v6_2_0.UpgradeJournal.doUpgrade(UpgradeJournal.java:200) at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:178) ... 31 more Stopping the server due to unexpected startup errors
(Full log attached).
When it fails, method updateXSDDynamicElement in JournalConverterUtil trying to convert the following XML document:
<?xml version="1.0" encoding="UTF-8"?> <root> <dynamic-element name="image" type="image" repeatable="false"/> <dynamic-element name="link" type="text" repeatable="false"/> </root>
As none of the dynamic-element tags have an "index-type" attribe, the following line becomes the victim of NPE.
element.remove(element.attribute("index-type"));
Steps to reproduce
1) Setup a Liferay 6.0.6 instance
2) Start it so that the table be generated in the DB (I was using Oracle when I discovered the bug, but it does not seem to be DB specific).
3) Stop Liferay 6.0.6
Alternatively you can import the attached dump file in the following way; you might have to adjust imp_schema.par to fit your environment.
$ echo "drop user LPS_32914_6200 cascade;" | sqlplus -S / as sysdba && impdp system/password parfile=imp_schema.par
4) Compile trunk
5) Copy the data folder over to the home of the newly compiled Liferay instance.
6) Setup portal-ext.properties to use the previously created database.
7) Start Liferay 6.2.x
The last three steps can be done by the attached shell script.
- is caused by
-
LPS-30964 Upgrade process to upgrade existing JournalStructures to DDMStructures
-
- Closed
-