Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-20557

Import Word Document causes NullPointerException when a space does not have a homepage set

XMLWordPrintable

      NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.

      Bug Description

      When you are importing word document using Office Connector's Doc Import function, if the space does not have a homepage set, you will get the following stacktrace:

      Cause
      
      java.lang.NullPointerException
      at com.benryan.webwork.WordImportAction.doFileImport(WordImportAction.java:312)
      Stack Trace:[hide]
      
      java.lang.NullPointerException
      at com.benryan.webwork.WordImportAction.doFileImport(WordImportAction.java:312)
      at com.benryan.webwork.WordImportAction.executeFileImport(WordImportAction.java:146)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:302)
      
      Steps to reproduce
      In Confluence versions above 3.2
      1. First, ensure that the space that you are using does not have a homepage set.
      2. Next, go to any page, and use the "Import Word Document" feature
      3. Upload the word document you want to import
      4. Use the default setting:
        Example
         Root page title: Test
         Where to import: Import as a new page in the current space
         Title conflicts: Rename imported pages if page name already exists
        
      5. Click Import button
      6. You will get the Oops page with the stacktrace mentioned above
      In Confluence 3.2 and below
      1. First, ensure that the space that you are using does not have a homepage set.
      2. Next, go to any page, and use the "Doc Import" feature
      3. Select the word document you want to import
      4. Click the Advanced button
      5. Use the following setting:
        Example
         Root page title: Test
         Where to import: Import as a new page in the current space
         Title conflicts: Imported pages become new versions of existing pages with the same title
        
      6. Click Import button
      7. You will get the Oops page with the stacktrace mentioned above
      Screenshot
      1. DocImportBug.png
      Workaround
      1. Please set a homepage for the space. For more information on how to do this, refer to the following documentation:

        1. DocImportBug.png
          598 kB
          Sashidaran Jayaraman [Atlassian]

              kypham Ky Pham
              sjayaraman Sashidaran Jayaraman [Atlassian]
              Votes:
              8 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: