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

IllegalStateException: Unable to initialize portal when deploy sample-ext with auto-deploy directory

    Details

      Description

      Steps to Reproduce:

      1. Build sample-ext plugin from /liferay-plugins-ee/ext/sample-ext using command "ant deploy".
      2. sample-ext-7.0.0.1.war file was automatically copied into deploy folder.

      Expected Results:
      No error thrown in console during the deploy.

      Actual Results:
      Below error in console:

      [exec] 12-Jun-2019 15:26:35.934 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [com.liferay.portal.kernel.servlet.PluginContextListener]
           [exec]          [exec]  java.lang.IllegalStateException: Unable to initialize portal
           [exec]          [exec] 	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:49)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:75)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:57)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:141)
           [exec]          [exec] 	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4682)
           [exec]          [exec] 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
           [exec]          [exec] 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)
           [exec]          [exec] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
           [exec]          [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [exec]          [exec] 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
           [exec]          [exec] 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
           [exec]          [exec] 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
           [exec]          [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [exec]          [exec] 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
           [exec]          [exec] 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
           [exec]          [exec] 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.startup.Catalina.start(Catalina.java:634)
           [exec]          [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]          [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]          [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]          [exec] 	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]          [exec] 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
           [exec]          [exec] 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
           [exec]          [exec] Caused by: java.lang.NullPointerException
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.DeployManagerUtil.getLevelsRequiredDeploymentContexts(DeployManagerUtil.java:57)
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.initDependentServletContextNames(HotDeployEvent.java:111)
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.<init>(HotDeployEvent.java:62)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:189)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:179)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
           [exec]          [exec] 	... 45 more
           [exec]          [exec] 
           [exec]          [exec] 12-Jun-2019 15:26:35.934 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
           [exec]          [exec] 12-Jun-2019 15:26:35.935 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/sample-ext] startup failed due to previous errors
           [exec]          [exec] 12-Jun-2019 15:26:36.017 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [138,091] milliseconds
           [exec]          [exec] 15:26:35,919 ERROR [main][BasePortalLifecycle:47] java.lang.NullPointerException
           [exec]          [exec] java.lang.NullPointerException
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.DeployManagerUtil.getLevelsRequiredDeploymentContexts(DeployManagerUtil.java:57)
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.initDependentServletContextNames(HotDeployEvent.java:111)
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.<init>(HotDeployEvent.java:62)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:189)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:179)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:75)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:57)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:141)
           [exec]          [exec] 	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4682)
           [exec]          [exec] 	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
           [exec]          [exec] 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)
           [exec]          [exec] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
           [exec]          [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [exec]          [exec] 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
           [exec]          [exec] 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
           [exec]          [exec] 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
           [exec]          [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [exec]          [exec] 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
           [exec]          [exec] 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
           [exec]          [exec] 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.startup.Catalina.start(Catalina.java:634)
           [exec]          [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]          [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]          [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]          [exec] 	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]          [exec] 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
           [exec]          [exec] 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
           [exec]          [exec] 15:26:35,936 ERROR [main][BasePortalLifecycle:34] java.lang.NullPointerException
           [exec]          [exec] java.lang.NullPointerException
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.DeployManagerUtil.getLevelsRequiredDeploymentContexts(DeployManagerUtil.java:57)
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.initDependentServletContextNames(HotDeployEvent.java:111)
           [exec]          [exec] 	at com.liferay.portal.kernel.deploy.hot.HotDeployEvent.<init>(HotDeployEvent.java:62)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.fireUndeployEvent(PluginContextListener.java:194)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalDestroy(PluginContextListener.java:157)
           [exec]          [exec] 	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalDestroy(BasePortalLifecycle.java:31)
           [exec]          [exec] 	at com.liferay.portal.kernel.servlet.PluginContextListener.contextDestroyed(PluginContextListener.java:110)
           [exec]          [exec] 	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4729)
           [exec]          [exec] 	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5388)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
           [exec]          [exec] 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)
           [exec]          [exec] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
           [exec]          [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [exec]          [exec] 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
           [exec]          [exec] 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)
           [exec]          [exec] 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
           [exec]          [exec] 	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
           [exec]          [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
           [exec]          [exec] 	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
           [exec]          [exec] 	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
           [exec]          [exec] 	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
           [exec]          [exec] 	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)
           [exec]          [exec] 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
           [exec]          [exec] 	at org.apache.catalina.startup.Catalina.start(Catalina.java:634)
           [exec]          [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec]          [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec]          [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec]          [exec] 	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec]          [exec] 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
           [exec]          [exec] 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
      

      Reproduced on:
      Tomcat 9.0.6 + MySQL 5.6. Portal master GIT ID: 09a7880423280351af6734df8bd5b49f911d4aa3.

      Note:
      The issue only occurs when deploy using deploy folder in portal.
      sample-ext can be deployed successfully using "ant direct-deploy".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              summer.zhang Summer Zhang
              Reporter:
              summer.zhang Summer Zhang
              Participants of an Issue:
              Recent user:
              Jason Pince
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 13 weeks, 5 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP1
                  7.2.X
                  7.2.1 CE GA2
                  7.3.10 DXP GA1
                  Master