Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-37594

Better exception handling for pdf export

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • None
    • None
    • 2
    • 3
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      Background
      User is not able to complete the PDF export and the below error is found in the logs

      com.atlassian.confluence.importexport.ImportExportException: Exception thrown while rendering the page 'no title found' to the PDF document /media/data0/confluence-home/temp/pdfexport-20150518-180515-1654-11/km-180515-1654-12.pdf
              at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:94)
              at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForSpace(FlyingSaucerPdfExporterService.java:60)
              at com.atlassian.confluence.extra.flyingpdf.PdfExportLongRunningTask$1.doInTransactionWithoutResult(PdfExportLongRunningTask.java:72)
              at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
              at com.atlassian.confluence.extra.flyingpdf.PdfExportLongRunningTask.runInternal(PdfExportLongRunningTask.java:52)
              at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:27)
              at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:58)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
              at com.atlassian.confluence.extra.flyingpdf.ConfluenceExportUserAgent.resolveAndOpenStream(ConfluenceExportUserAgent.java:112)
              at org.xhtmlrenderer.swing.NaiveUserAgent.getBinaryResource(NaiveUserAgent.java:223)
              at org.xhtmlrenderer.pdf.ITextFontResolver.importFontFaces(ITextFontResolver.java:97)
              at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:178)
              at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:142)
              at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:74)
              ... 12 more
      

      Expectation

      1. Better logging so we can identify the page that is causing this
      2. Handle the NullPointerException so that the export does not fail completely i.e. the export completes without pages causing this exception.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              msayed Mizan Ali Sayed (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: