NullPointerException at javax.mail.internet.MimeUtility.getEncoding When Exporting Page to Word

Still need help?

The Atlassian Community is here for you.

Ask the community


Exporting a page to Word results in this browser error:

The following appears in the atlassian-confluence.log:

2013-06-03 23:38:52,775 ERROR [http-8512-5] [ContainerBase.[Standalone].[localhost].[/c512]] log Unhandled exception occurred whilst decorating page
 -- url: /c512/exportword | userName: admin | referer: http://localhost:8512/c512/display/ds/testdasdsa
	at javax.mail.internet.MimeUtility.getEncoding(
	at javax.mail.internet.MimeUtility.getEncoding(
	at javax.mail.internet.MimeBodyPart.updateHeaders(
	at javax.mail.internet.MimeBodyPart.updateHeaders(
	at javax.mail.internet.MimeMultipart.updateHeaders(
	at javax.mail.internet.MimeBodyPart.updateHeaders(
	at javax.mail.internet.MimeMessage.updateHeaders(
	at javax.mail.internet.MimeMessage.saveChanges(
	at javax.mail.internet.MimeMessage.writeTo(
	at javax.mail.internet.MimeMessage.writeTo(
	at com.atlassian.confluence.servlet.ExportWordPageServer.service(


There are broken remote images in the page (images linked from the web that can no longer be loaded - image may have been moved, removed, or the server hosting the image may be down). Editing the page again to try to remove the broken image is not possible, as the image will be "hidden".


  1. Install the Confluence Source Editor
  2. Edit the page, then click on the <> button on the top right corner of the editor
  3. Look for the broken image, example:

        <ri:url ri:value="http://localhost:8420/c42/download/attachments/589826/global.logo"/>
  4. Remove the broken image tags, or change the link to a valid link for the image (if the image have been moved)
  5. Hit Apply, and save the page
Last modified on Mar 30, 2016

Was this helpful?

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