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

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

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? 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:

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: