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

Exception when deploying a portlet with empty portlet.properties file: ConfigurationNotFoundException: The base properties file was not found

    Details

      Description

      Reproduction Steps:

      1. Install Liferay
      2. Start the server
      3. When the server is fully up, deploy a portlet with an empty portlet.properties file test-props-portlet-0.0.1-SNAPSHOT.war
      4. Watch the console log

      Expected Results:
      The portlet should be deployed without errors

      Actual Results:
      The following error appears in the console log:

      10:38:09,119 INFO  [localhost-startStop-3][HotDeployImpl:217] Deploying test-props-portlet from queue
      10:38:09,119 INFO  [localhost-startStop-3][PluginPackageUtil:1016] Reading plugin package for test-props-portlet
      10:38:09,179 ERROR [localhost-startStop-3][HotDeployImpl:233] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering plugins for test-props-portlettest-props-portlet
      com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering plugins for test-props-portlettest-props-portlet
      	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeDeploy(PluginPackageHotDeployListener.java:64)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:230)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:257)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
      	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ExceptionInInitializerError
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.initPortletProps(PluginPackageHotDeployListener.java:195)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:131)
      	at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeDeploy(PluginPackageHotDeployListener.java:61)
      	... 24 more
      Caused by: com.germinus.easyconf.ConfigurationNotFoundException: Error reading configuration for portlet: The base properties file was not found
      	at com.liferay.portal.configuration.easyconf.ClassLoaderComponentConfiguration.getProperties(ClassLoaderComponentConfiguration.java:80)
      	at com.liferay.portal.configuration.ConfigurationImpl.getComponentProperties(ConfigurationImpl.java:409)
      	at com.liferay.portal.configuration.ConfigurationImpl.printSources(ConfigurationImpl.java:424)
      	at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:78)
      	at com.liferay.portal.configuration.ConfigurationImpl.<init>(ConfigurationImpl.java:55)
      	at com.liferay.portal.configuration.ConfigurationFactoryImpl.getConfiguration(ConfigurationFactoryImpl.java:32)
      	at com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil.getConfiguration(ConfigurationFactoryUtil.java:27)
      	at com.liferay.util.portlet.PortletProps.<init>(PortletProps.java:66)
      	at com.liferay.util.portlet.PortletProps.<clinit>(PortletProps.java:70)
      	... 31 more
      Oct 13, 2015 10:38:09 AM org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring root WebApplicationContext
      10:38:09,185 INFO  [localhost-startStop-3][PortletHotDeployListener:344] Registering portlets for test-props-portlet
      10:38:09,369 INFO  [localhost-startStop-3][PortletHotDeployListener:492] 1 portlet for test-props-portlet is available for use
      Oct 13, 2015 10:38:09 AM org.apache.catalina.startup.HostConfig deployDirectory
      

      Reproduced on 6.2.x (a3efd044e92dfd26e399cf21e381d83ca3b4b5fb)
      Reproduced on Master (65116e4296833aaa506a52d8c1e8688a110da8fa)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 Alpha 2