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

Lock_.owner column size is too small for clustered environments using 6.2.10 and WebSphere 8.0

    Details

      Description

      Description:
      AnnotatedObjectOutputStream retrieves the servlet context name and adds it to the serialized version of the Address, causing it it to exceed the maximum length allowed in the Lock_.Owner column in the database, which is VARCHAR(255). When a clustered environment is setup on WebSphere 8.0 and is started, the portal immediately attempts to enter data exceeding the maximum allowed length of the column size, throwing the portal into an infinite loop of data truncation exceptions.

      Steps to reproduce:
      1. Setup WebSphere 8.0 + Liferay 6.2.10 using deployment manager and unicast clustering.
      2. Start the Cluster.
      3. See errors in log.

      Expected Behavior: The clustered environment should start normally.
      Actual Behavior: The environment does not start, and shows data truncation errors.

      Exception:

      00000014 SystemOut     O 12:29:25,657 WARN  [server.startup : 0][ClusterMasterExecutorImpl:193] Unable to obtain the cluster master token. Trying again.
      com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.DataException: Could not execute JDBC batch update
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:251)
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.flush(BasePersistenceImpl.java:198)
      	at com.liferay.portal.service.impl.LockLocalServiceImpl.lock(LockLocalServiceImpl.java:232)
      	at com.liferay.portal.service.impl.LockLocalServiceImpl.lock(LockLocalServiceImpl.java:190)
      	at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
      	at java.lang.reflect.Method.invoke(Method.java:611)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.sun.proxy.$Proxy72.lock(Unknown Source)
      	at com.liferay.portal.service.LockLocalServiceUtil.lock(LockLocalServiceUtil.java:364)
      	at com.liferay.portal.cluster.ClusterMasterExecutorImpl.getMasterAddressString(ClusterMasterExecutorImpl.java:173)
      	at com.liferay.portal.cluster.ClusterMasterExecutorImpl.initialize(ClusterMasterExecutorImpl.java:117)
      	at com.liferay.portal.kernel.cluster.ClusterMasterExecutorUtil.initialize(ClusterMasterExecutorUtil.java:53)
      	at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:185)
      	at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
      	at com.liferay.portal.events.StartupAction.run(StartupAction.java:68)
      	at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1238)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:206)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:161)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:342)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
      	at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1366)
      	at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:618)
      	at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:587)
      	at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:421)
      	at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
      	at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
      	at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
      	at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
      	at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
      	at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
      	at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1165)
      	at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1369)
      	at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
      	at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
      	at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:771)
      	at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2169)
      	at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5378)
      	at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5594)
      	at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
      	at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2174)
      	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:389)
      	at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
      	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:332)
      	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:119)
      	at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:938)
      	at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:496)
      	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1702)
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.DataException: Could not execute JDBC batch update
      	at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:30)
      	at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:147)
      	at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.flush(ClassLoaderSession.java:237)
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.flush(BasePersistenceImpl.java:194)
      	... 50 more
      Caused by: org.hibernate.exception.DataException: Could not execute JDBC batch update
      	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
      	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
      	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      	at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:144)
      	... 52 more
      Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'owner' at row 1
      	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
      	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1135)
      	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
      	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
      	... 58 more
      Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'owner' at row 1
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4118)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
      	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 17 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 M1