pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-2412) Loading XFDF document fails with ClassCastException
Date Sun, 02 Nov 2014 13:38:34 GMT

    [ https://issues.apache.org/jira/browse/PDFBOX-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193828#comment-14193828
] 

ASF subversion and git services commented on PDFBOX-2412:
---------------------------------------------------------

Commit 1636134 from [~lehmi] in branch 'pdfbox/branches/1.8'
[ https://svn.apache.org/r1636134 ]

PDFBOX-2412: add valid field nodes only to avoid ClassCastExceptions and double entries

> Loading XFDF document fails with ClassCastException
> ---------------------------------------------------
>
>                 Key: PDFBOX-2412
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2412
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.8.7, 2.0.0
>         Environment: MacOS X 10.9.5, Java 1.7.0_65
>            Reporter: Thomas Krammer
>              Labels: FDF
>
> When loading the the this XFDF Document
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
> <fields>
> <field name="Z2S1"><value>Erblasser</value></field>
> </fields>
> </xfdf>
> {code}
> using {{FDFDocument.loadXFDF(new File("ttt.xfdf"));}}
> I get the following exception:
> {code}
> java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredTextImpl
cannot be cast to org.w3c.dom.Element
> 	at org.apache.pdfbox.pdmodel.fdf.FDFDictionary.<init>(FDFDictionary.java:105)
> 	at org.apache.pdfbox.pdmodel.fdf.FDFCatalog.<init>(FDFCatalog.java:68)
> 	at org.apache.pdfbox.pdmodel.fdf.FDFDocument.<init>(FDFDocument.java:101)
> 	at org.apache.pdfbox.pdmodel.fdf.FDFDocument.loadXFDF(FDFDocument.java:251)
> 	at org.apache.pdfbox.pdmodel.fdf.FDFDocument.loadXFDF(FDFDocument.java:236)
>     ...
> {code}



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

Mime
View raw message