Unable to Remove Attachment Because of Special Characters

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

  • Confluence is running over SSL
  • Unable to remove an attachment

The following appears in the atlassian-confluence.log:

2014-04-25 07:12:24,735 ERROR [http-172.16.5.144-8442-37] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
 -- url: /confluence/json/removeattachmentversion.action | userName: Dfeng | referer: https://confluence.harman.com/confluence/pages/viewpageattachments.action?pageId=33981018
java.lang.NullPointerException
	at com.atlassian.confluence.pages.AttachmentDownloadPathCache.toKey(AttachmentDownloadPathCache.java:31)
	at com.atlassian.confluence.pages.CachingAttachmentManager.removeAttachmentVersionFromServer(CachingAttachmentManager.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171
fileName : (51job.com)申请贵公司Embedded Software Engineer - Test(成都)-肖军 .htm
version : 1
caused by: java.lang.NullPointerException
at com.atlassian.confluence.pages.AttachmentDownloadPathCache.toKey(AttachmentDownloadPathCache.java:31)

Cause

 The attachment file name contains special characters.

Resolution

  • Shutdown Confluence
  • Open <CONFLUENCE-INSTALLATION-DIRECTORY>/conf/server.xml
  • Edit the file by adding the following in the SSL Connector element:

    URIEncoding="UTF-8"
  • Save the file
  • Restart Confluence

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.