Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32707

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

    Details

    • 12 status:
      Resolved
    • 11 status:
      Resolved

      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:

      17-Jul-2017 10:22:45.883 WARN [http-nio-8980-exec-4] org.apache.fop.apps.FOUserAgent.processEvent "fo:table-body" is missing child elements. Required content model: marker* (table-row+|table-cell+) (No context info available)
      ERROR:  'For input string: ":0"'
      javax.xml.transform.TransformerException: java.lang.NumberFormatException: For input string: ":0"
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.generatePDF(SiteInfoToolServlet.java:433)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.print_participant(SiteInfoToolServlet.java:222)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.getSiteParticipantList(SiteInfoToolServlet.java:194)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.doGet(SiteInfoToolServlet.java:163)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:460)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NumberFormatException: For input string: ":0"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:580)
      at java.lang.Integer.parseInt(Integer.java:615)
      at org.apache.xmlgraphics.xmp.XMPSchemaAdapter.parseISO8601Date(XMPSchemaAdapter.java:236)
      at org.apache.xmlgraphics.xmp.XMPSchemaAdapter.getDateValue(XMPSchemaAdapter.java:282)
      at org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter.getMetadataDate(XMPBasicAdapter.java:170)
      at org.apache.fop.render.intermediate.IFRenderer.createDefaultDocumentMetadata(IFRenderer.java:549)
      at org.apache.fop.render.intermediate.IFRenderer.startPageSequence(IFRenderer.java:500)
      at org.apache.fop.area.RenderPagesModel.startPageSequence(RenderPagesModel.java:89)
      at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:98)
      at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
      at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
      at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
      at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:265)
      at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:559)
      at GregorSamsa.template$dot$0()
      at GregorSamsa.applyTemplates()
      at GregorSamsa.transform()
      at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:620)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:739)
      ... 31 more
      ---------
      java.lang.NumberFormatException: For input string: ":0"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:580)
      at java.lang.Integer.parseInt(Integer.java:615)
      at org.apache.xmlgraphics.xmp.XMPSchemaAdapter.parseISO8601Date(XMPSchemaAdapter.java:236)
      at org.apache.xmlgraphics.xmp.XMPSchemaAdapter.getDateValue(XMPSchemaAdapter.java:282)
      at org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter.getMetadataDate(XMPBasicAdapter.java:170)
      at org.apache.fop.render.intermediate.IFRenderer.createDefaultDocumentMetadata(IFRenderer.java:549)
      at org.apache.fop.render.intermediate.IFRenderer.startPageSequence(IFRenderer.java:500)
      at org.apache.fop.area.RenderPagesModel.startPageSequence(RenderPagesModel.java:89)
      at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:98)
      at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
      at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
      at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
      at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:265)
      at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:559)
      at GregorSamsa.template$dot$0()
      at GregorSamsa.applyTemplates()
      at GregorSamsa.transform()
      at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:620)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:739)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.generatePDF(SiteInfoToolServlet.java:433)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.print_participant(SiteInfoToolServlet.java:222)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.getSiteParticipantList(SiteInfoToolServlet.java:194)
      at org.sakaiproject.site.tool.SiteInfoToolServlet.doGet(SiteInfoToolServlet.java:163)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:460)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  austinUH Austin
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code