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

Plugin table upgrade fails when new table is added

    Details

      Description

      Deploy a plugin that uses service builder then add a new SB entity and regenerate services and then redeploy and you should get a error during deployment that looks like:

      23:34:22,968 INFO  [ServiceComponentLocalServiceImpl:333] No optional file META-INF/portlet-model-hints-ext.xml found
      23:41:47,634 ERROR [HotDeployImpl:165] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering plugins for saml-portlet
      com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering plugins for saml-portlet
      	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeDeploy(PluginPackageHotDeployListener.java:59)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:162)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:91)
      	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:151)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:141)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:63)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:55)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:103)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
      	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.deployDirectory(HostConfig.java:1095)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
      	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:680)
      Caused by: java.lang.ExceptionInInitializerError
      	at com.liferay.saml.model.impl.fooModelImpl.<clinit>(fooModelImpl.java:68)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:247)
      	at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.upgradeModels(ServiceComponentLocalServiceImpl.java:392)
      	at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.doUpgradeDB(ServiceComponentLocalServiceImpl.java:292)
      	at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.upgradeDB(ServiceComponentLocalServiceImpl.java:199)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      	at $Proxy89.upgradeDB(Unknown Source)
      	at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.initServiceComponent(ServiceComponentLocalServiceImpl.java:163)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      	at $Proxy89.initServiceComponent(Unknown Source)
      	at com.liferay.portal.service.ServiceComponentLocalServiceUtil.initServiceComponent(ServiceComponentLocalServiceUtil.java:284)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.initServiceComponent(PluginPackageHotDeployListener.java:216)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:118)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeDeploy(PluginPackageHotDeployListener.java:56)
      	... 24 more
      Caused by: java.lang.NullPointerException
      	at com.liferay.portal.configuration.easyconf.ClassLoaderAggregateProperties.addGlobalFileName(ClassLoaderAggregateProperties.java:74)
      	at com.liferay.portal.configuration.easyconf.ClassLoaderComponentConfiguration._getAvailableProperties(ClassLoaderComponentConfiguration.java:116)
      	at com.liferay.portal.configuration.easyconf.ClassLoaderComponentConfiguration.getProperties(ClassLoaderComponentConfiguration.java:78)
      	at com.liferay.portal.configuration.ConfigurationImpl.getComponentProperties(ConfigurationImpl.java:402)
      	at com.liferay.portal.configuration.ConfigurationImpl.printSources(ConfigurationImpl.java:417)
      	at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:77)
      	at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:54)
      	at com.liferay.portal.configuration.ConfigurationFactoryImpl.getConfiguration(ConfigurationFactoryImpl.java:28)
      	at com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil.getConfiguration(ConfigurationFactoryUtil.java:27)
      	at com.liferay.util.service.ServiceProps.<init>(ServiceProps.java:66)
      	at com.liferay.util.service.ServiceProps.<clinit>(ServiceProps.java:70)
      	... 53 more
      

      This is caused by PortletClassLoaderUtil.setClassLoader() being called too late.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              mika.koivisto Mika Koivisto
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 39 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2