null pointer exception after upload attachment to Confluence with Ä, Ü or Ö in the filename

Andreas Köcher August 11, 2017

Version: Confluence 6.2.3 

A null pointer exeption occurs every time if I try to upload an attachment with a Character Ä, Ü or Ö in the filename. Everything works fine with filenames without those characters or even with the characters ä, ü or ö.

I also use JIRA and it accepts the upload of filenames with Ä, Ü or Ö without an error.

2 answers

0 votes
Thorsten B. August 24, 2017

Hi all,

just ran into the same problem with Confluence 6.2.4

server.xml has the UTF-8 param

 

When i use the upload form i get a NullPointerException and nothing is uploaded or written to the database.

 

When i use the the drag and drop form on the page i get a warning with the information "null" but the file is uploaded and i can see it in the attachment list.

But when i try to access/download/delete it i get a "Page Not Found" error.

I can see the file on the filesystem and i can also see the information in the database!

confluence_file_error.PNG

The interesting part is that in the lowertitle column i still have a uppercase char Ö and not ö. If i change now the lowertitel to 123ö.txt inside the database manually everythings works. I can access/download/delete the file on the UI

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2017

Hi Andreas,

A similar issue was reported before, but the lower case letters with umlauts also did not work: Accessing edit/remove attachment URL containing a filename with German Umlauts throws NullPointerException

Please make sure your <confluence_install_dir>/conf/server.xml has this setting inside the connector directive, as recommended in the bug report: 

URIEncoding="UTF-8"

Confluence will have to be restarted to pick up the change to the file.

I look forward to hearing whether this works for you.

Thanks,

Ann

Andreas Köcher August 12, 2017

Hi Ann,

Thank you for your reply.  The issue looks similar, because it is also about German Umlauts in the filename. 

Daniel's reply says, the reason is a Tomcat error and there is nothing you can do in Confluence. 

It might be right at that time, but this new problem is different. The aspect URIEncoding="UTF-8"  was always part of our connector directive. The error does not occur with low letter umlauts like ö, ä or ü and it does not occur in JIRA, which also runs on a Tomcat application server.  

You can test it in Confluence yourself, upload AuslÖser.txt or Auslöser.txt. The difference between these files is only the big Ö and they contain only some text. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events