Trying to export dashboard using the Better PDF Exporter for Jira leads to Oops! on Jira Data Center
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 exporting a dashboard as a PDF using the Better PDF Exporter for Jira leads to a PDF with the following content:

...

1
2
Oops! Something went wrong while rendering your PDF.
Tip: probably there is a syntax error in the Velocity template <dashboard-fo.vm>.
and further down in the details
1
2
3
4
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getGadgetInfo' in class
com.midori.jira.plugin.pdfview.renderer.tool.GadgetTool threw exception java.lang.IndexOutOfBoundsException: Index 1 out of
bounds for length 1 at dashboard-fo.vm (xxxxxxxx)[line 54, column 36]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:342)
Environment
Jira 8.x, 9.x
Diagnosis
In the atlassian-jira.log file you will find the correlating error
1
2
3
2024-04-22 10:59:01,219+0200 http-nio-127.0.0.1-8080-exec-94 url: /jira/rest/com.midori.jira.plugin.pdfview/1.0/pdf/pdf-view/101/dashboard/41502/render; user: xxxx ERROR xxxx 658x865025x15 xxxxx 10.xxx.xxx.xxx,127.0.0.1 /rest/com.midori.jira.plugin.pdfview/1.0/pdf/pdf-view/101/dashboard/41502/render [c.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
Verify if this also happens when loading the dashboard directly. If so, check the KB Dashboard fails to load with error 500 in Jira as an alternative cause.
Cause
This is caused by an issue with the Index and a possible database integrity issue. The error and cause is similar to what is described in Searching for issues in the Issue Navigator throws NullPointerException in Jira Server or Data Center
Solution
Please use the following steps to fix the situation
Run the database integrity checker. Please run the different checks one by one. Fix any issues encountered.
Run a full re-index
Was this helpful?