JVM crashes during Import from Word in Confluence
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
Problem
JVM crashes after attempting to import some Microsoft Word documents into Confluence using the Import form Word option.
The following appears in atlassian-confluence.log
1
2
2016-03-15 09:47:32,283 WARN [http-bio-8857-exec-15] [com.benryan.webwork.WordImportAction] executeFileUpload Failed to delete uploaded file /Users/person/instances/con57home/temp/upload_cbeeb5d3_176d_4655_a18c_08d216aa6987_00000001.tmp
-- referer: http://localhost:8857/confluence/pages/worddav/uploadimport.action?pageId=98307 | url: /confluence/pages/worddav/importword.action | userName: admin | action: importword | page: 98307
Cause
We believe this error is related to the following JDK bugs:
Workaround
If you experience this problem regularly you can enable an Office Connector Canary that will check whether an import is likely to succeed before proceeding with the actual import. This workaround is available in Confluence 5.9.1 and later.
To enable the Office Connector Canary:
Go to
http://<yoursite>/admin/darkfeatures.action
Paste the following dark feature key in the Enable dark feature field then hit Submit.
1
com.atlassian.confluence.officeconnector.canary
When a user attempts to import a file from Word, the Office Connector Canary will spawn a new JVM to try the document first. If the spawned JVM crashes we consider the document to unsafe and stop the import process. Users will see the following error in Confluence: "The uploaded file contains data which cannot be safely imported".

Memory considerations
The Office Connector Canary process does consume additional memory. You can use the com.atlassian.confluence.officeconnector.canary.memory_value
system property to increase the amount of memory if necessary. It currently defaults to 1024mb. See Configuring System Properties for more information.
Was this helpful?