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

When using HSQL to upgrade from 6.1 to 6.2, Calendar portlet fails to deploy and upgrade properly

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 6.2.10 EE GA1, 6.2.X EE
    • Fix Version/s: None
    • Labels:
    • Story Points:
      1
    • Fix Priority:
      3

      Description

      Issue
      When we attempt to upgrade from 6.1 EE GA2 to 6.2 EE SP14 using HSQL (i.e. copying the $liferay.home/data/hsql folder from 6.1 EE GA2 to 6.2 EE SP14 prior to an upgrade), the Calendar portlet in 6.2 EE SP14 fails to deploy and upgrade the old data properly.

      Note: Based on our testing, the calendar portlet's deployment works properly in MySQL 5.5

      Steps to Reproduce

      1. Setup 6.1 EE GA2 + Tomcat bundle, and start up
      2. Add Calendar portlet to the default site's Welcome page
      3. Click on "Add Event" > "Reminders": set to "Do not send a reminder" and Save
        (All settings are default except for "Reminders")
      4. Shut down the 6.1 EE GA2 server
      5. Unzip 6.2 EE SP14 + Tomcat bundle
      6. Copy the $liferay.home/data/hsql folder from 6.1 EE GA2, and copy it into 6.2 EE SP14's $liferay.home/data/hsql
      7. Remove the OOTB calendar-portlet from 6.2 EE SP14 bundle's $tomcat.home/webapps folder
      8. Place updated Calendar portlet WAR file calendar-portlet-6.2.10.13.war which contains the fix for LPS-71153 into 6.2 EE SP14 bundle's $liferay.home/deploy directory
      9. Start 6.2 EE SP14 to upgrade the copied data and wait for the deployment process and for http://localhost:8080 to load up

      Actual Result
      Calendar portlet fails to deploy/load/upgrade. On the UI we see 1_WAR_calendarportlet with the message "This portlet has been undeployed. Please redeploy it or remove it from the page." The following error appears during the initial deployment process:

      06:03:31,783 INFO  [localhost-startStop-1][HookHotDeployListener:709] Registering hook for calendar-portlet
      Loading file:/home/liferay/Desktop/liferay-portal-6.2-ee-sp14/tomcat-7.0.62/temp/10-calendar-portlet/WEB-INF/classes/portal.properties
      06:03:31,789 INFO  [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.calendar.hook.upgrade.UpgradeProcess_1_0_2
      06:03:31,790 INFO  [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.calendar.hook.upgrade.v1_0_2.UpgradeCalendarResource
      06:03:31,805 ERROR [localhost-startStop-1][HotDeployImpl:233] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for calendar-portletcalendar-portlet
      com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for calendar-portletcalendar-portlet
      	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:317)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:230)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
      	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: unexpected token: WHERE
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:170)
      	at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:162)
      	at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:114)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.updateRelease(HookHotDeployListener.java:2856)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:2250)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:1758)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:720)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:314)
      	... 23 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: unexpected token: WHERE
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:170)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:184)
      	at com.liferay.calendar.hook.upgrade.UpgradeProcess_1_0_2.doUpgrade(UpgradeProcess_1_0_2.java:33)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:167)
      	... 30 more
      Caused by: java.sql.SQLException: unexpected token: WHERE
      	at org.hsqldb.jdbc.Util.sqlException(Util.java:232)
      	at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(JDBCPreparedStatement.java:3893)
      	at org.hsqldb.jdbc.JDBCConnection.prepareStatement(JDBCConnection.java:643)
      	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:469)
      	at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy$LazyConnectionInvocationHandler.invoke(LazyConnectionDataSourceProxy.java:376)
      	at com.sun.proxy.$Proxy6.prepareStatement(Unknown Source)
      	at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedConnectionHandler.prepareStatement(UpgradeOptimizedConnectionHandler.java:79)
      	at com.liferay.portal.kernel.upgrade.dao.orm.UpgradeOptimizedConnectionHandler.invoke(UpgradeOptimizedConnectionHandler.java:59)
      	at com.sun.proxy.$Proxy552.prepareStatement(Unknown Source)
      	at com.liferay.calendar.hook.upgrade.v1_0_2.UpgradeCalendarResource.updateCalendarUserIds(UpgradeCalendarResource.java:89)
      	at com.liferay.calendar.hook.upgrade.v1_0_2.UpgradeCalendarResource.upgradeCalendarResourceUserIds(UpgradeCalendarResource.java:147)
      	at com.liferay.calendar.hook.upgrade.v1_0_2.UpgradeCalendarResource.doUpgrade(UpgradeCalendarResource.java:42)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:167)
      	... 33 more

      Expected Result
      Calendar portlet deploys, upgrades, and loads without any issues, as seen in MySQL 5.5.

      Reproduced in
      ee-6.2.x 8d475f7c8e60378ac89770f7fbec8f549df5203c - using the Calendar portlet with LPS-71153

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

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

                  Packages

                  Version Package