Details

    • Story Points:
      6
    • Fix Priority:
      4
    • Similar Issues:
      Show 5 results 

      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.

      1. imp_schema.par
        0.2 kB
        Laszlo Csontos
      2. LPS-32722-6.2.x.log
        13 kB
        Laszlo Csontos
      3. LPS-32914-upgrade.sh
        0.8 kB
        Laszlo Csontos
      4. portal-ext-LPS-32914.properties
        0.2 kB
        Laszlo Csontos

        Issue Links

          Activity

          Hide
          Laszlo Csontos added a comment - - edited

          Going through the reproduction steps with e62745fd19688bbbd4aff5c41450588f07e22f47 gives another exception, however NPE thrown in updateXSDDynamicElement is caused by LPS-30964.

          Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException
          	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:139)
          	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:61)
          	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:142)
          	at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:148)
          	at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
          	... 20 more
          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.upgrade.v6_2_0.UpgradeJournal.updateTemplates(UpgradeJournal.java:380)
          	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
          
          Show
          Laszlo Csontos added a comment - - edited Going through the reproduction steps with e62745fd19688bbbd4aff5c41450588f07e22f47 gives another exception, however NPE thrown in updateXSDDynamicElement is caused by LPS-30964 . Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException 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:139) at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:61) at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:142) at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:148) at com.liferay.portal.events.StartupAction.run(StartupAction.java:52) ... 20 more 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.upgrade.v6_2_0.UpgradeJournal.updateTemplates(UpgradeJournal.java:380) 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
          Hide
          Pani Gui (Inactive) added a comment -

          FAILED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 604cebd97a5d23a20355ca2d54e6768823e75240.

          Upgrading from 6.0.6 to 6.2.0 fails.

          Failed on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 2ca07788508f9290e8041d9c9729589ab0f6562c.

          Upgrading fails.

          Show
          Pani Gui (Inactive) added a comment - FAILED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 604cebd97a5d23a20355ca2d54e6768823e75240. Upgrading from 6.0.6 to 6.2.0 fails. Failed on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 2ca07788508f9290e8041d9c9729589ab0f6562c. Upgrading fails.
          Hide
          Pani Gui (Inactive) added a comment -

          PASSED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 604cebd97a5d23a20355ca2d54e6768823e75240.

          Upgrading from 6.0.6 to 6.2.0 fails at JournalConverterUtil.

          Failed on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: eda31f931d28a7b8e57a5477cb2f8b9d95a46c6d.

          Upgrading passes JournalConverterUtil.

          Show
          Pani Gui (Inactive) added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 604cebd97a5d23a20355ca2d54e6768823e75240. Upgrading from 6.0.6 to 6.2.0 fails at JournalConverterUtil. Failed on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: eda31f931d28a7b8e57a5477cb2f8b9d95a46c6d. Upgrading passes JournalConverterUtil.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 17 weeks, 1 day ago

                Development

                  Structure Helper Panel