[ 
https://issues.apache.org/jira/browse/FOP-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexios Giotis updated FOP-2581:
--------------------------------
    Attachment: FOP-2581.patch

Patch, test input & output files attached.

> NumberFormatException when page-sequence format can't be parsed as an Integer
> -----------------------------------------------------------------------------
>
>                 Key: FOP-2581
>                 URL: https://issues.apache.org/jira/browse/FOP-2581
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Alexios Giotis
>         Attachments: FOP-2581.patch, barcode-test.fo, out.if.xml, out.pdf
>
>
> This was introduced in FOP-2548 "Support Barcode4J page number", so I am the 
> test FO is based on this.
> To reproduce it:
> {noformat}
> $ ./fop barcode-test.fo -if out.if.xml
> Feb 26, 2016 2:29:14 PM org.apache.fop.events.LoggingEventListener 
> processEvent
> INFO: Rendered page #1.
> Feb 26, 2016 2:29:14 PM org.apache.fop.events.LoggingEventListener 
> processEvent
> INFO: Rendered page #2.
> $ ./fop -ifin out.if.xml out.pdf
> Feb 26, 2016 2:29:47 PM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> org.apache.fop.apps.FOPException: For input string: "A"
> java.lang.NumberFormatException: For input string: "A"
>       at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:288)
>       at org.apache.fop.cli.IFInputHandler.renderTo(IFInputHandler.java:77)
>       at org.apache.fop.cli.Main.startFOP(Main.java:186)
>       at org.apache.fop.cli.Main.main(Main.java:217)
> Caused by: java.lang.NumberFormatException: For input string: "A"
>       at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>       at java.lang.Integer.parseInt(Integer.java:492)
>       at java.lang.Integer.parseInt(Integer.java:527)
>       at 
> org.apache.fop.render.intermediate.IFParser$Handler$PageHandler.startElement(IFParser.java:526)
>       at 
> org.apache.fop.render.intermediate.IFParser$Handler.startIFElement(IFParser.java:369)
>       at 
> org.apache.fop.render.intermediate.IFParser$Handler.startElement(IFParser.java:310)
>       at 
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
>       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown 
> Source)
>       at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown 
> Source)
>       at 
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
> Source)
>       at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>  Source)
>       at 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
> Source)
>       at 
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
>       at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:285)
>       ... 3 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to