Details

    • Story Points:
      6
    • Fix Priority:
      4

      Description

      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.

        Attachments

        1. imp_schema.par
          0.2 kB
        2. lportal.dmp.zip
          1002 kB
        3. LPS-32722-6.2.x.log
          13 kB
        4. LPS-32914-upgrade.sh
          0.8 kB
        5. portal-ext-LPS-32914.properties
          0.2 kB

          Issue Links

            Activity

              People

              • Assignee:
                pani.gui Pani Gui (Inactive)
                Reporter:
                laszlo.csontos Laszlo Csontos (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 20 weeks, 2 days ago