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

DM - NPE when adding a basic document in the same directory as a folder

    Description

    Steps to reproduce:

    1. Navigate to Content > Documents and Media
    2. Click on Add > Folder
    3. Create a new folder and Save
    4. Navigate back to root, click on Add > Basic Document
    5. Upload a new document

    Expected result: New document is uploaded
    Actual result: DM throws NPE and the page results in

    $processor.processMax()
    

    Reproduced on:
    Tomcat 7 + MySQL 5. Portal master GIT ID: 0dc86746f4239195007c133777dc3f6d90aa2bdb.

    16:16:00,464 ERROR [http-bio-8080-exec-3][LiferayMethodExceptionEventHandler:54] Unable to execute method processMax {exception=com.liferay.portal.kernel.portlet.PortletContainerException: com.liferay.portal.kernel.portlet.PortletContainerException: java.lang.NullPointerException, className=com.liferay.portal.layoutconfiguration.util.velocity.TemplateProcessor}
    com.liferay.portal.kernel.portlet.PortletContainerException: com.liferay.portal.kernel.portlet.PortletContainerException: java.lang.NullPointerException
            at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:129)
            at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:155)
            at com.liferay.portal.layoutconfiguration.util.velocity.TemplateProcessor.processMax(TemplateProcessor.java:179)
            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 org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
            at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
            at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
            at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
            at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
            at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
            at org.apache.velocity.Template.merge(Template.java:328)
            at org.apache.velocity.Template.merge(Template.java:235)
            at com.liferay.portal.template.velocity.VelocityTemplate.processTemplate(VelocityTemplate.java:112)
            at com.liferay.portal.template.AbstractTemplate.processTemplate(AbstractTemplate.java:161)
            at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doProcessTemplate(RuntimePageImpl.java:364)
            at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doDispatch(RuntimePageImpl.java:282)
            at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.getProcessedTemplate(RuntimePageImpl.java:93)
            at com.liferay.portal.layoutconfiguration.util.RuntimePageUtil.getProcessedTemplate(RuntimePageUtil.java:37)
            at com.liferay.application.list.taglib.display.context.logic.PanelAppContentHelper.writeContent(PanelAppContentHelper.java:87)
            at org.apache.jsp.application_005fcontent.page_jsp._jspService(page_jsp.java:219)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
            at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:245)
            at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:256)
            at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:162)
            at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:63)
            at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:92)
            at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:45)
            at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:55)
            at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:75)
            at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:52)
            at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:369)
            at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:351)
            at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:201)
            at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:87)
            at org.apache.jsp.layout.view.control_005fpanel_jsp._jspService(control_005fpanel_jsp.java:128)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
            at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:245)
            at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:256)
            at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:162)
            at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:63)
            at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:92)
            at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:45)
            at com.liferay.portal.model.impl.BasePanelLayoutTypeControllerImpl.includeLayoutContent(BasePanelLayoutTypeControllerImpl.java:95)
            at com.liferay.portal.model.impl.LayoutImpl.includeLayoutContent(LayoutImpl.java:825)
            at com.liferay.portal.model.LayoutWrapper.includeLayoutContent(LayoutWrapper.java:1385)
            at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:328)
            at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:167)
            at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:72)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
            at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:169)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
            at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:561)
            at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:538)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:299)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:115)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
            at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
            at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:159)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.security.sso.ntlm.servlet.filters.NtlmPostFilter.processFilter(NtlmPostFilter.java:103)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:99)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:336)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:125)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:299)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:254)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:86)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:265)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:133)
            at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:225)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
            at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
            at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
            at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
            at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:115)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
            at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
            at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
            at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
            at java.lang.Thread.run(Thread.java:745)
    Caused by: com.liferay.portal.kernel.portlet.PortletContainerException: java.lang.NullPointerException
            at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:138)
            at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:125)
            at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126)
            ... 189 more
    Caused by: java.lang.NullPointerException
            at com.liferay.portlet.PortletURLUtil.getRefreshURL(PortletURLUtil.java:288)
            at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1673)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
            at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
            at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:75)
            at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:52)
            at com.liferay.portlet.PortletContainerImpl._doRender(PortletContainerImpl.java:643)
            at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:135)
            ... 191 more
    

      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, 26 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 Alpha 1