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

Document with deleted owner throws NPE when try to view

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 7.1.X
    • Fix Version/s: None
    • Component/s: DM > Media Gallery
    • Labels:
    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Create a new user. (Ex. 'userA').
      2. Login with the user 'userA' and add a new Document. (Ex. a .png image)
      3. Login with omniadmin and delete (deactivate and delete) to user 'userA'.
      4. Go to 'Documents and Media' and click on the document to view it.

      Expected behavior:
      The document is showed.

      Observed behavior:
      The document is not showed.
      A NPE is thrown in the log:

       
      2019-06-11 13:29:19.859 ERROR [http-nio-8080-exec-7][IncludeTag:128] Current URL /group/guest/~/control_panel/manage?p_p_id=com_liferay_document_library_web_portlet_DLAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_document_library_web_portlet_DLAdminPortlet_mvcRenderCommandName=%2Fdocument_library%2Fview_file_entry&_com_liferay_document_library_web_portlet_DLAdminPortlet_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fguest%2F%7E%2Fcontrol_panel%2Fmanage%3Fp_p_id%3Dcom_liferay_document_library_web_portlet_DLAdminPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview&_com_liferay_document_library_web_portlet_DLAdminPortlet_fileEntryId=34533 generates exception: java.lang.NullPointerException 
      java.lang.NullPointerException 
      	at org.apache.jsp.document_005flibrary.info_005fpanel_005ffile_005fentry_jsp._jspService(info_005fpanel_005ffile_005fentry_jsp:762) 
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) 
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 
      	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:741) 
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:319) 
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:330) 
      	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153) 
      	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62) 
      	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120) 
      	at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48) 
      	at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67) 
      	at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:202) 
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79) 
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53) 
      	at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:393) 
      	at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:370) 
      	at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:215) 
      2019-06-11 13:29:19.869 ERROR [http-nio-8080-exec-7][IncludeTag:128] Current URL /group/guest/~/control_panel/manage?p_p_id=com_liferay_document_library_web_portlet_DLAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_document_library_web_portlet_DLAdminPortlet_mvcRenderCommandName=%2Fdocument_library%2Fview_file_entry&_com_liferay_document_library_web_portlet_DLAdminPortlet_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fguest%2F%7E%2Fcontrol_panel%2Fmanage%3Fp_p_id%3Dcom_liferay_document_library_web_portlet_DLAdminPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview&_com_liferay_document_library_web_portlet_DLAdminPortlet_fileEntryId=34533 generates exception: com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the primary key 34509 
      com.liferay.portal.kernel.exception.NoSuchUserException: No User exists with the primary key 34509 
      	at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:8920) 
      	at com.liferay.portal.service.persistence.impl.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:8936) 
      	at com.liferay.portal.service.base.UserLocalServiceBaseImpl.getUser(UserLocalServiceBaseImpl.java:297) 
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66) 
      	at com.liferay.portal.kernel.service.UserLocalServiceWrapper.getUser(UserLocalServiceWrapper.java:1964) 
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66) 
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153) 
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203) 
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94) 
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113) 
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) 
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55) 
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130) 
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125) 
      	at com.liferay.message.boards.service.impl.MBMessageLocalServiceImpl.addMessage(MBMessageLocalServiceImpl.java:255) 
      	at com.liferay.message.boards.service.impl.MBMessageLocalServiceImpl.addDiscussionMessage(MBMessageLocalServiceImpl.java:219) 
      	at com.liferay.message.boards.service.impl.MBMessageLocalServiceImpl.getDiscussionMessageDisplay(MBMessageLocalServiceImpl.java:1048) 
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66) 
      	at com.liferay.message.boards.service.MBMessageLocalServiceWrapper.getDiscussionMessageDisplay(MBMessageLocalServiceWrapper.java:549) 
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sergio.alonso Sergio Alonso
                Reporter:
                sergio.alonso Sergio Alonso
                Participants of an Issue:
                Recent user:
                Sergio Alonso
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

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

                  Packages

                  Version Package