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

Sybase auto upgrade error - could not insert LayoutPrototypeImpl

    Details

    • Fix Priority:
      3

      Description

      Failure is inconsistent, but common on CI

      Steps to Reproduce:

      1. Import attached Sybase database dump
      2. Set property "upgrade.database.auto.run=true"
      3. Start portal to execute an upgrade
      03:26:03,334 ERROR [main][JDBCExceptionReporter:234] Implicit conversion from datatype 'UNITEXT' to 'VARCHAR' is not allowed.  Use the CONVERT function to run this query.
      
      03:26:03,344 WARN  [main][PortalInstanceLifecycleListenerManagerImpl:146] Unable to register portal instance {mvccVersion=1, companyId=20116, accountId=20118, webId=liferay.com, mx=liferay.com, homeURL=, logoId=0, system=false, maxUsers=0, active=true}
      com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not insert: [com.liferay.portal.model.impl.LayoutPrototypeImpl]
      	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:569)
      	at com.liferay.portal.service.persistence.impl.ResourcePermissionPersistenceImpl.findByC_N_S_P(ResourcePermissionPersistenceImpl.java:3432)
      	at com.liferay.portal.service.persistence.impl.ResourcePermissionPersistenceImpl.findByC_N_S_P(ResourcePermissionPersistenceImpl.java:3275)
      	at com.liferay.portal.service.persistence.impl.ResourcePermissionPersistenceImpl.findByC_N_S_P(ResourcePermissionPersistenceImpl.java:3226)
      	at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.addResourcePermissions(ResourcePermissionLocalServiceImpl.java:346)
      	at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy28.addResourcePermissions(Unknown Source)
      	at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addResources(ResourceLocalServiceImpl.java:236)
      	at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy34.addResources(Unknown Source)
      	at com.liferay.portal.service.impl.GroupLocalServiceImpl.addGroup(GroupLocalServiceImpl.java:438)
      	at com.liferay.portal.service.impl.GroupLocalServiceImpl.addGroup(GroupLocalServiceImpl.java:481)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy46.addGroup(Unknown Source)
      	at com.liferay.portal.service.impl.LayoutPrototypeLocalServiceImpl.addLayoutPrototype(LayoutPrototypeLocalServiceImpl.java:92)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy145.addLayoutPrototype(Unknown Source)
      	at com.liferay.layout.page.template.util.LayoutPrototypeHelperUtil.addLayoutPrototype(LayoutPrototypeHelperUtil.java:57)
      	at com.liferay.portal.search.web.internal.layout.prototype.SearchLayoutFactoryImpl.createSearchLayoutPrototype(SearchLayoutFactoryImpl.java:146)
      	at com.liferay.portal.search.web.internal.layout.prototype.SearchLayoutFactoryImpl.createSearchLayoutPrototype(SearchLayoutFactoryImpl.java:78)
      	at com.liferay.portal.search.web.internal.layout.prototype.AddLayoutPrototypePortalInstanceLifecycleListener.portalInstanceRegistered(AddLayoutPrototypePortalInstanceLifecycleListener.java:38)
      	at com.liferay.portal.instance.lifecycle.internal.PortalInstanceLifecycleListenerManagerImpl.registerCompany(PortalInstanceLifecycleListenerManagerImpl.java:142)
      	at com.liferay.portal.instance.lifecycle.internal.PortalInstanceLifecycleListenerManagerImpl.addPortalInstanceLifecycleListener(PortalInstanceLifecycleListenerManagerImpl.java:90)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
      	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42)
      	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813)
      	at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1788)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:436)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:333)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:302)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
      	at com.liferay.registry.internal.RegistryImpl.registerService(RegistryImpl.java:342)
      	at com.liferay.portal.internal.servlet.MainServlet._registerPortalInitialized(MainServlet.java:1285)
      	at com.liferay.portal.internal.servlet.MainServlet.init(MainServlet.java:451)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1134)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:983)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4876)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5185)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1831)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
      	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
      	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526)
      	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
      	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
      	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
      	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
      	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
      	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
      	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
      	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
      	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not insert: [com.liferay.portal.model.impl.LayoutPrototypeImpl]
      	at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:39)
      	at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:124)
      	at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:104)
      	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:61)
      	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:53)
      	at com.liferay.portal.service.persistence.impl.ResourcePermissionPersistenceImpl.findByC_N_S_P(ResourcePermissionPersistenceImpl.java:3418)
      	... 144 more
      Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [com.liferay.portal.model.impl.LayoutPrototypeImpl]
      	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2455)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2875)
      	at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
      	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
      	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      	at com.liferay.portal.dao.orm.hibernate.event.NestableAutoFlushEventListener.onAutoFlush(NestableAutoFlushEventListener.java:69)
      	at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185)
      	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261)
      	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      	at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:112)
      	... 148 more
      Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Implicit conversion from datatype 'UNITEXT' to 'VARCHAR' is not allowed.  Use the CONVERT function to run this query.
      
      	at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4003)
      	at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3093)
      	at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
      	at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:289)
      	at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:271)
      	at com.sybase.jdbc4.jdbc.SybStatement.updateLoop(SybStatement.java:2514)
      	at com.sybase.jdbc4.jdbc.SybStatement.executeUpdate(SybStatement.java:2498)
      	at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:297)
      	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
      	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
      	at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2435)
      	... 159 more
      

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            victor.ware Victor Ware
            Participants of an Issue:
            Recent user:
            Brian Wulbern
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              50 weeks, 6 days ago

                Packages

                Version Package