I am trying to export a space as a PDF.
The export process starts, then the following error occurs: "Ha fallito durante l'esportazione a PDF. Messaggio di eccezione - java.lang.NullPointerException", in English: "It has failed during the PDF export. Exception message: java.lang.NullPointerException ".
So the error this time is:
RuntimeException error occurred while performing an XHTML storage transformation
I found an article that says something like this can be caused by running Java 1.8 on MS Windows server 2003: RuntimeException error occurred while performing an XHTML storage transformation
Does this apply to your instance?
Unfortunately not. I am running Java 8 on a Linux server. The distribution is Centos version 7
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So that we can take a closer look, I created a support ticket using the email address you are using for Community. You will receive a confirmation email from atlassian.com with your ticket details within the next few minutes. When the issue has been resolved we can circle back to let the Community know what the fix is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francesco.
I understand a null pointer exception error is seen in the browser when you export a space to PDF. This has been seen in the past due to third party plugins that render ok but don't export well. If you can post the rest of the stack trace it may give us an idea which plugin.
The Tracking Plugin has been known to cause a similar issue:NullPointerException exporting a page or space to PDF due to Tracking-Table Macro
I look forward to hearing what you find.
Thanks,
Ann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ann, thank you for your reply.
My issue is that I am unable to view the stack trace for this exception. I took a look at the Catalina log files, but I can't see this exception (while I can see the trace of other unrelated exception). I also tried to increase the log verbosity using the Administrative panel Confluence offer me (i haven't tried to increase the Log4J verbosity directly).
Can you point me where this trace is?
Thank you for your support
Best regards
Francesco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The errors should be going into the application log - look in system information to see where that is (the default is a set of files in <confluence home>/logs/ )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nick, thanks for your reply.
I've done a text search in the logs directory for the word "NullPointerException" without any luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For testing troubleshooting purposes, please try Disabling or enabling all add-ons (using Safe Mode) and export the space to PDF while in safe mode. Note: Any macros that depend on user installed plugins will be disabled while the instance is in safe mode so you will want to do it during off hours or a maintenance window.
If the export works in safe mode, then you can re-enable the add-ons one by one until the export breaks, in order to see which one is causing the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ann. I just tried what you suggest, but I get the same error as before. If it can help you, I don't have any plugin installed. I just use the default Confluence installation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ann, if it can help you, i just found the Confluence dir. It was under /var even if in the settings i specified to save them in the confluence home /log. Anyway, here there are (i replaced my real domain with http://host)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just removed all Jira tasks from the space. Now i am able to export a single page in PDF. If i try to export the whole space, the NullPointerException comes again, this time with a different trace.
Here you can find it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It does help! Thank you very much for the log. It looks like Jira issues macros are causing the null pointer exception during PDF exports:
2017-10-23 20:01:20,899 ERROR [Long running task: PDF Space Export] [xhtml.view.macro.ViewMacroMarshaller] handleMacroExecutionException Error rendering macro: jira
-- url: /spaces/flyingpdf/doflyingpdf.action | referer: http://host:8090/spaces/flyingpdf/flyingpdf.action?key=SPED | traceId: 78afd2847c7b36c8 | userName: f.marcaccio | action: doflyingpdf
java.lang.NullPointerException
Please let me know if the Jira issues macros are displaying on the pages as expected before the export. (I am looking for reasons why the PDF export cannot render those macros.)
I found some bug reports with Jira issues and PDF exports, but none that really match our case, so I am optimistic that we are not running into a bug.
Edit - Our comments crossed, I will look at the new log now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.