Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-32914

Upgrade from 6.0.6 to 6.2.0 fails at JournalConverterUtil

    Details

    • 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
    • Labels:
    • Environment:
      Tomcat 7 + Oracle 11gR2. Portal 6.2.x GIT ID: 6b7defb818ca7be926207855a141e3b30e5898f4.

      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:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 40 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.0 CE M4