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

java.lang.NullPointerException when try to attach file with non-Latin characters

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

      Step to Reproduce

      1. Go to a Confluence page.
      2. Click Tools >> Attachment
      3. Click Choose File button
      4. Attach file with the name 'İ ' ( use the İ.txt attached in this ticket)
      5. The following error will appear in the browser and the atlassian-confluence.log file.
        java.lang.NullPointerException
        at com.atlassian.confluence.pages.actions.beans.AttachmentStorer.attachFiles(AttachmentStorer.java:64)
        Stack Trace:[hide]
        
        java.lang.NullPointerException
        at com.atlassian.confluence.pages.actions.beans.AttachmentStorer.attachFiles(AttachmentStorer.java:64)
        at com.atlassian.confluence.pages.actions.AbstractViewAttachmentsAction.execute(AbstractViewAttachmentsAction.java:104)
        at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
        at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
        at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
        at 
        

      Workaround

      Applicable for other non-latin languages except for İ Turkish character

      1. Ensure your database collation settings are able to handle international strings.
        Refer to this comment for a PostgreSQL fix
      2. Refer to this link for more information

        1. İ.txt
          0.0 kB
          Jing Hwa Cheok
        2. server.xml
          2 kB
          Jing Hwa Cheok
        3. server.xml
          2 kB
          Karel Hala
        4. NullPointerException.txt
          31 kB
          Stephan Eisvogel
        5. Antrieb-Übersetzung.png
          60 kB
          Stephan Eisvogel

            [CONFSERVER-31088] java.lang.NullPointerException when try to attach file with non-Latin characters

            Nobuyuki Mukai made changes -
            Link New: This issue relates to CONFSERVER-58657 [ CONFSERVER-58657 ]

            higuchi@ricksoft.jpさん

            I'm glad to hear that the information is helpful.

            Thanks.

            Nobuyuki Mukai added a comment - higuchi@ricksoft.jp さん I'm glad to hear that the information is helpful. Thanks.

            Hi, Nobuyuki

            This information is very helpful for us.

            Thank you.

            Akira Higuchi added a comment - Hi, Nobuyuki This information is very helpful for us. Thank you.

            As a side effect of this issue, deleting the uploaded file from GUI also fails. For this workaround, you can use REST API instead. Please follow the following step to delete the uploaded file –

            1. Confirm contentid of the attachment
              select * from content where pageid=<the page ID the file is attached>;
              
            2. Delete the content above with Confluence REST API
              curl -v -S -u user:password -X DELETE http://<confluence-base-url>/rest/api/content/<contentid obtained by Step 1>
              

            Nobuyuki Mukai added a comment - As a side effect of this issue, deleting the uploaded file from GUI also fails. For this workaround, you can use REST API instead. Please follow the following step to delete the uploaded file – Confirm contentid of the attachment select * from content where pageid=<the page ID the file is attached>; Delete the content above with Confluence REST API curl -v -S -u user:password -X DELETE http://<confluence-base-url>/rest/api/content/<contentid obtained by Step 1>
            Katherine Yabut made changes -
            Workflow Original: JAC Bug Workflow v3 [ 2897728 ] New: CONFSERVER Bug Workflow v4 [ 3005830 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow v2 [ 2789596 ] New: JAC Bug Workflow v3 [ 2897728 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: JAC Bug Workflow [ 2737815 ] New: JAC Bug Workflow v2 [ 2789596 ]
            Owen made changes -
            Symptom Severity Original: Major [ 14431 ] New: Severity 2 - Major [ 15831 ]
            Owen made changes -
            Workflow Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2386241 ] New: JAC Bug Workflow [ 2737815 ]

            Hi All,

            This problem was fixed in Confluence 6.7.2, we tested it.

             

            Thank you

            Regards,

            Emre

            Ortakatman ve Sürüm Yönetimi [MKK] added a comment - Hi All, This problem was fixed in Confluence 6.7.2, we tested it.   Thank you Regards, Emre

              glipatov George Lipatov
              jcheok Jing Hwa Cheok (Inactive)
              Affected customers:
              65 This affects my team
              Watchers:
              68 Start watching this issue

                Created:
                Updated:
                Resolved: