Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-65732

Accessing files and images dialog on Confluence editor resulted in NullPointerException

      Issue Summary

      In Confluence 7.12 and above, accessing the Files and images dialog to upload an image file will result in java.lang.NullPointerException in the <Confluence-Home>/logs/atlassian-confluence.log file.

      Steps to Reproduce

      1. Create a new page in Confluence or edit an existing Confluence page.
      2. Load up the Files and images dialog.
      3. Upload an image file (of any image file extension) to the page.

      The same java.lang.NullPointerException would also be thrown in the <Confluence-Home>/logs/atlassian-confluence.log when accessing the Files and images dialog of a page with an attachment image already embedded into it.

      Expected Results

      The page and its embedded attachments are load up fine without any errors thrown in the <Confluence-Home>/logs/atlassian-confluence.log.

      Actual Results

      The page and its embedded attachments are load up fine, but the below exception is thrown in the <Confluence-Home>/logs/atlassian-confluence.log file:

      2021-05-26 14:06:42,229 ERROR [http-nio-27120-exec-5] [[Standalone].[localhost].[/c7120].[file-server]] log Servlet.service() for servlet [file-server] in context with path [/c7120] threw exception
      java.lang.NullPointerException
              at com.atlassian.confluence.servlet.download.AttachmentDownload.streamResponse(AttachmentDownload.java:293)
              at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.serveFile(ServeAfterTransactionDownload.java:51)
              at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:28)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:46)
              at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      ...
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            [CONFSERVER-65732] Accessing files and images dialog on Confluence editor resulted in NullPointerException

            Just got this on 7.18.2

             ERROR [http-nio-8090-exec-12] [[Standalone].[localhost].[/].[file-server]] log Servlet.service() for servlet [file-server] in context with path [] threw exception
            java.lang.NullPointerException 

            @Jiri any idea why this would return and how to counter it?

            Martin Hilbig [team neusta] added a comment - - edited Just got this on 7.18.2  ERROR [http-nio-8090-exec-12] [[Standalone].[localhost].[/].[file-server]] log Servlet.service() for servlet [file-server] in context with path [] threw exception java.lang.NullPointerException @Jiri any idea why this would return and how to counter it?

            Jiri Hronik added a comment - - edited

            A fix for this issue is available to Server and Data Center customers in Confluence 7.12.3
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            Jiri Hronik added a comment - - edited A fix for this issue is available to Server and Data Center customers in Confluence 7.12.3 Upgrade now or check out the Release Notes to see what other issues are resolved.

              hrehioui Hasnae (Inactive)
              lrura Lauretha Rura
              Affected customers:
              7 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: