struts.multipart.saveDir property has not been defined error when saving
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
When saving a page the following error results:
1
2
3
ERROR [http-nio-8090-exec-7] [xhtml.view.macro.ViewMacroMarshaller] handleMacroExecutionException Error rendering macro: view-file
xxxxxxxxx | userName: username | action: viewpage | url: /pages/viewpage.action
java.lang.IllegalStateException: struts.multipart.saveDir property has not been defined
Environment
Confluence 8.x.x
Diagnosis
The confluence.cfg.xml file contains an entry for webwork.multipart.saveDir in 8.x.x.
Cause
For Confluence version > 8, In the confluence.cfg.xml file webwork.multipart.saveDir has been replaced with struts.multipart.saveDir. This will be done automatically when an upgrade to version > = 8 is performed, but sometimes, if the upgrade task fails, then it will not change automatically.
Solution
Check on each of the Confluence nodes the file confluence.cfg.xml in the home directory
If the file is missing the property struts.multipart.saveDir
Stop Confluence on the node
Add the following line to confluence.cfg.xml
<property name="struts.multipart.saveDir">${localHome}/temp</property>
Restart the Confluence node
Was this helpful?