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

DB Upgrade - Sybase - "Incorrect syntax near the keyword 'alter'." error and server stops due to unexpected startup errors - 5.2.3, 6.0.6, 6.0.12 to 6.1.x, 6.2.x

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.1.0 CE GA1, 6.2.0 CE M2
    • Labels:
    • Environment:
      Tomcat 7.0.25 + Sybase 15.0.2. 6.1.x GIT ID: 203ce24ed59140e2765f3328a626c17a99305d79.
      Tomcat 7.0.25 + Sybase 15.0.2. 6.2.x GIT ID: 3c4f4b709e9e7e2f090c87327a1131d576e677c5.

      Description

      **This issue is Sybase-specific.

      When upgrading from 5.2.3, 6.0.6, or 6.0.12 to 6.1.x or 6.2.x using Sybase, there are exceptions in the console, and the server stops, and the upgrade fails. I have attached the full console output.

      This issue PASSED on:

      • Tomcat 7.0.23 + Sybase 15.0.2. 6.2.x Revision: 97949.

      This issue FAILED on:

      • Tomcat 7.0.23 + Sybase 15.0.2. 6.2.x Revision: 97950

      Steps to reproduce:
      1. Start up Liferay 6.1.x or 6.2.x referencing a 5.2.3, 6.0.6, or 6.0.12 Sybase database. Be sure to include the necessary legacy properties.

      ##
      ## From portal-legacy-5.2.properties
      ##
      
      users.image.max.height=0
      users.image.max.width=0
      
      locale.prepend.friendly.url.style=0
      
      auth.token.check.enabled=false
      
      permissions.user.check.algorithm=5
      permissions.view.dynamic.inheritance=false
      
      image.hook.impl=com.liferay.portal.image.DatabaseHook
      
      cdn.host.http=${cdn.host}
      cdn.host.https=${cdn.host}
      
      virtual.hosts.default.community.name=
      
      breadcrumb.show.guest.group=false
      breadcrumb.show.parent.groups=false
      
      wiki.page.titles.regexp=([^/\\\\\\[\\]%&[email protected]]+)
      wiki.page.titles.remove.regexp=([/\\\\\\[\\]%&[email protected]]+)
      
      ##
      ## From portal-legacy-6.0.properties
      ##
      
      users.last.name.required=true
      
      portal.security.manager.strategy=liferay
      
      layout.types=portlet,panel,embedded,article,url,link_to_layout
      
      editor.wysiwyg.portal-web.docroot.html.portlet.message_boards.edit_message.bb_code.jsp=bbcode
      
      setup.wizard.enabled=false
      
      discussion.subscribe.by.default=false
      
      message.boards.subscribe.by.default=false
      
      upgrade.processes=\
      	com.liferay.portal.upgrade.UpgradeProcess_6_0_12_to_6_1_0

      The following exceptions will display in the console:

      23:37:48,084 ERROR [MainServlet:198] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'.
      
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'.
      
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:58)
              at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1267)
              at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:195)
              at javax.servlet.GenericServlet.init(GenericServlet.java:160)
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'.
      
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213)
              at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:93)
              at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:46)
              at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:81)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:48)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:119)
              at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
              ... 20 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect syntax near the keyword 'alter'.
      
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:213)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:227)
              at com.liferay.portal.upgrade.UpgradeProcess_6_0_0.doUpgrade(UpgradeProcess_6_0_0.java:53)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
              ... 27 more
      Caused by: java.sql.SQLException: Incorrect syntax near the keyword 'alter'.
      
              at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
              at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
              at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
              at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
              at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
              at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
              at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:723)
              at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1166)
              at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1119)
              at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:222)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:242)
              at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:235)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.runSQL(UpgradeProcess.java:117)
              at com.liferay.portal.upgrade.v6_0_0.UpgradeJournal.doUpgrade(UpgradeJournal.java:30)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
              ... 30 more
      Stopping the server due to unexpected startup errors

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ginson.ren Ginson Ren
              Reporter:
              brian.chiu Brian Chiu (Inactive)
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 34 weeks, 6 days ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2