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

Unable to register custom DLProcessor (dl.file.entry.processors) from a hook: causes NPE

Details

    Description

      1- Create a hook that registers a custom impl for PDFProcessor (https://github.com/lipusz/liferay-plugins/tree/LPS-49670-master)
      2- Build & deploy (custom-pdfprocessor-hook-7.0.0.1.war)

      Result:

      13:51:50,240 INFO  [localhost-startStop-1][HotDeployImpl:217] Deploying custom-pdfprocessor-hook from queue
      13:51:50,240 INFO  [localhost-startStop-1][PluginPackageUtil:1006] Reading plugin package for custom-pdfprocessor-hook
      13:51:50,376 INFO  [localhost-startStop-1][HookHotDeployListener:541] Registering hook for custom-pdfprocessor-hook
      14:22:10,666 ERROR [localhost-startStop-1][HotDeployImpl:231] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for custom-pdfprocessor-hook
      com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for custom-pdfprocessor-hook
      	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:281)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:228)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:254)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:97)
      	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:4939)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
      	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:633)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
      	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.NullPointerException
      	at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
      	at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1125)
      	at com.liferay.portlet.documentlibrary.util.DLProcessorRegistryImpl.register(DLProcessorRegistryImpl.java:166)
      	at com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil.register(DLProcessorRegistryUtil.java:70)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener$DLFileEntryProcessorContainer.registerDLProcessor(HookHotDeployListener.java:2560)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:1518)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.initPortalProperties(HookHotDeployListener.java:1376)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:552)
      	at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:278)
      	... 24 more
      

      == Notes for QA
      The custom processor hook, more precisely, the CustomPDFProcessorImpl contains dummy impl methods only. It's not supposed to work, it's just for demonstrating that the portal cannot register a custom DL processor hook.

      Attachments

        Issue Links

          Activity

            People

              joyce.wang Joyce Wang
              tibor.lipusz Tibor Lipusz
              Rafaela Nascimento Rafaela Nascimento
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8 years, 33 weeks, 2 days ago

                Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M2