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

Knowledge Base throws exception when importing ZIP

    Details

      Description

      When importing Knowledge Base articles from a ZIP file, the log shows a NPE is thrown. To reproduce:

      • Go to Admin > Content > KnowledgeBase > Import
      • Upload the ZIP file attached to this issue

      Expected result: The articles are imported and a success message is shown to the user.
      Actual result: An error message is shown and the following trace appears in the logs:

      java.lang.NullPointerException
      	at com.liferay.portal.kernel.io.ByteArrayFileInputStream.close(ByteArrayFileInputStream.java:70)
      	at com.liferay.portal.kernel.util.StreamUtil.cleanUp(StreamUtil.java:50)
      	at com.liferay.portal.kernel.util.StreamUtil.cleanUp(StreamUtil.java:78)
      	at com.liferay.knowledgebase.admin.portlet.AdminPortlet.importFile(AdminPortlet.java:256)
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:168)
      	at com.liferay.util.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:281)
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:83)
      	at com.liferay.util.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:216)
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
      	at com.liferay.portlet.CheckboxParametersPortletFilter.doFilter(CheckboxParametersPortletFilter.java:56)
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:68)
      	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
      	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:113)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:97)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      

        Attachments

        1. fixed.png
          fixed.png
          62 kB
        2. lp-6.2-develop-tutorials.zip
          30 kB
        3. reproduced.png
          reproduced.png
          36 kB

          Issue Links

            Activity

              People

              • Assignee:
                hong.zhao Hong Zhao
                Reporter:
                adolfo.perez Adolfo Pérez
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M2