NumberFormatException: For input string: ":0" when generating PDF with timezone <= GMT -10

Description

Generating a PDF may fail with exception

java.lang.RuntimeException: java.lang.NumberFormatException: For input string: ":0"

Steps to reproduce:

  • Site Info

    • set your computer / server's system time to GMT -10 (Hawaii) or less (or further west)

    • Go to Site Info

    • above the class roster, click the "Printable Version" link

    • the UI will show an error "Failed to load PDF document"

    • check the tomcat logs and the NumberFormatException will have occured

  • Rwiki

    • Add the RWiki tool to a site.

    • Click on the Info button.

    • Under Views and Feeds, click on the PDF link.

  • Statistics

    • Create and/or Save a new Report

    • click the Export button at the bottom of the page

    • click export PDF

 

Here's an example of the error in Site Info:

Activity

Show:

Austin October 18, 2017 at 8:20 PM
Edited

I just tried to reproduce the problem on the 10.x nightly server: https://qa10-mysql.nightly.sakaiproject.org (which doesn't have the fix, right?)
by setting my user time zone to pacific/honolulu and I was not able to reproduce the problem, so testing the fix does require the server's time to be set to GMT -10 or less

Sam Ottenhoff October 18, 2017 at 7:49 PM

Can't you modify your user preferences to set a different time zone to test?

Austin October 18, 2017 at 4:34 PM

it's good that the (fixed) problem does not happen on https://trunk-mysql.nightly.sakaiproject.org

However, the sakai nightly servers are on on EDT time. This issue requires that that server is on GMT -10 (or less).

I can confirm that the problem no longer happens on my local test machine running:

Build info: Sakai - 7a2c1df4 - Sakai 13-SNAPSHOT - Server austins-MacBook-Pro.local
Sever Time: Wed, 18 Oct 2017 11:32:15 HST (GMT -10)

Gnapika Reddy Kudumula October 18, 2017 at 3:21 PM

Tested the issue on https://trunk-mysql.nightly.sakaiproject.org, generating a pdf doesn't create any exceptions. 

Austin September 18, 2017 at 7:29 PM

Thanks for looking into that and for merging the pull request.

Fixed

Details

Priority

Affects versions

Components

Assignee

Reporter

Created July 17, 2017 at 3:32 PM
Updated August 2, 2024 at 2:03 PM
Resolved September 18, 2017 at 7:15 PM