pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thad Humphries <thad.humphr...@gmail.com>
Subject ExtractMetadata error
Date Thu, 09 Mar 2017 03:11:18 GMT
When I run the org.apache.pdfbox.examples.pdmodel.ExtractMetadata example,
it works. However when I put the same code into my class, it throws an
exception when I call "DomXmpParser xmpParser = new DomXmpParser();"  The
trace is:

java.lang.AbstractMethodError:
javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
at org.apache.xmpbox.xml.DomXmpParser.<init>(DomXmpParser.java:81)
at
com.jthad.util.image.MetadataExtractor.getPdfMetadata(MetadataExtractor.java:170)
at
com. jthad.util.image.TestMetadataExtractor.testPdf0(TestMetadataExtractor.java:41)
...

Line 81 in DomXmpParser.java is

dbFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl",
true);

I am at a loss to understand how "new DomXmpParser()" works from the
command line but fails when called by a JUnit test in Eclipse.

-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message