Details
-
Bug
-
Resolution: Fixed
-
High
-
6.6.1
-
4
-
Severity 2 - Major
-
2
-
Description
Summary
Page with attachment failed to Export to PDF for Confluence hosted in Windows/Linux as well as space export.
Confluence 6.6.1 hosted in Windows/Linux will have issue exporting a page/space into PDF if there is an attachment in the page.
Steps to Reproduce
- Install Confluence 6.6.1 on a Windows/Linux machine
- Create a page and include an attachment to the page (I tested using drag and drop a JPG file)
- Export the Page to PDF or export the space
Expected Results
Page/Space can be exported as expected
Actual Results
Confluence will hit into System Error page and show the stacktrace in the page
error below is thrown in the atlassian-confluence.log:
2018-01-18 13:46:17,145 ERROR [http-nio-8090-exec-8] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- url: /spaces/flyingpdf/pdfpageexport.action | traceId: 27d57be9b3196c01 | userName: admin | referer: http://localhost:8090/display/PROJ/abc com.atlassian.confluence.importexport.ImportExportException: Could not close the export file C:\Installers\Confluence\confluence6.6.1\home\temp\pdfexport-20180118-180118-1346-13\PROJ-abc-180118-1346-14.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:111) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:54) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:95) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.doExecute(ExportPageAsPdfAction.java:40) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:29) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:33) .... at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Unable to delete file: C:\Installers\Confluence\confluence6.6.1\home\temp\pdfexport_01182018_134617068\_01182018_134617109 at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2400) at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1721) at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1617) at com.atlassian.confluence.extra.flyingpdf.util.ImageFileCacheUtils.removeTempDirectory(ImageFileCacheUtils.java:28) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:109) ... 369 more
Note
- Tested on OS:
- Windows 7
- Windows 10
- Linux
- Tested with attachment file type:
- JPG
- TXT
- XLSX
- RAR
- Confluence 6.6.1 installed on Linux does not encounter this issue.
- This is likely to be caused by the extra code added in confluence-flyingpdf-plugin-4.1.3.jar as downgrading to confluence-flyingpdf-plugin-4.1.2.jar then the export with attachment will work.
Workaround
Remove the confluence-flyingpdf-plugin-4.1.3.jar located in <Confluence-Installation>/confluence/WEB-INF/atlassian-bundled-plugins and replace it with confluence-flyingpdf-plugin-4.1.4.jar from Atlassian Repository
Please take a backup of the original bundled plugin
Attachments
Issue Links
- Mentioned in