Attachment Links are unavailable in Confluence with java.net.URISyntaxException exception thrown in the UI
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Problem
When clicking the link to an attachment, you are redirected to a 'Oops - an error has occurred page' with the following exception displayed on screen:
1
Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Illegal character in path at index 47: /confluence/download/attachments/xxx/xxx
Diagnosis
Environment
Network traffic goes through a proxy
Diagnostic Steps
Bypass the proxy. If clicking the link takes you to the attachment, proceed with the resolution below.
Cause
The proxy server is not configured correctly for URI encoding.
Solution
Resolution
Ensure all steps listed in Proxying Atlassian server applications with Apache HTTP Server (mod_proxy_http) have been completed successfully, specially the ProxyPass and ProxyPassReverse directives. If using mod_jk, add the following option to your Apache mod_jk configuration:
1
JkOptions +ForwardURICompatUnparsed
Was this helpful?