tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus Lövgren (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (TIKA-1068) Metadata-extractor throws NoSuchMethodError for jpg image with xmp header data
Date Fri, 01 Feb 2013 08:15:14 GMT

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

Magnus Lövgren resolved TIKA-1068.
----------------------------------

    Resolution: Cannot Reproduce
    
> Metadata-extractor throws NoSuchMethodError for jpg image with xmp header data
> ------------------------------------------------------------------------------
>
>                 Key: TIKA-1068
>                 URL: https://issues.apache.org/jira/browse/TIKA-1068
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.3
>            Reporter: Magnus Lövgren
>            Priority: Critical
>         Attachments: vinter080501-66.jpg
>
>
> Using Tika 1.3, parsing of jpg files throws NoSuchMethodError when the jpg contains xmp
data. No Error was thrown in Tika 1.2.
> The metadata-extractor was updated in Tika 1.3 (to "com.drewnoakes:metadata-extractor:2.6.2"),
See TIKA-811 (duplicated by TIKA-996). That jar is badly compiled (as mentioned by Emmanuel
Hugonnet as comment on TIKA-915) and causes the NoSuchMethodError!
> => the metadata-extractor 2.6.2 jar needs to be replaced! Problem seems fixed in metadata-extractor
2.7.0, but that isn't released yet.
> Discussions available at:
> http://code.google.com/p/metadata-extractor/issues/detail?id=39
> http://code.google.com/p/metadata-extractor/issues/detail?id=55
> Code to reproduce problem:
> =========================
> <dependency>
> 	<groupId>org.apache.tika</groupId>
> 	<artifactId>tika-core</artifactId>
> 	<version>1.3</version>
> </dependency>
> <dependency>
> 	<groupId>org.apache.tika</groupId>
> 	<artifactId>tika-xmp</artifactId>
> 	<version>1.3</version>
> </dependency>
> <dependency>
> 	<groupId>org.apache.tika</groupId>
> 	<artifactId>tika-parsers</artifactId>
> 	<version>1.3</version>
> </dependency>
> InputStream inputStream = ... // vinter080501-66.jpg file (attached)
> ContentHandler contentHandler = new BodyContentHandler(2000000);
> Metadata metadata = new Metadata();
> ParseContext context = new ParseContext();
> Parser parser = new AutoDetectParser();
> parser.parse(inputStream, contentHandler, metadata, context); // Throws NoSuchMethodError
> => java.lang.NoSuchMethodError: com.adobe.xmp.properties.XMPPropertyInfo.getValue()Ljava/lang/Object;
> 	at com.drew.metadata.xmp.XmpReader.extract(Unknown Source)
> 	at com.drew.imaging.jpeg.JpegMetadataReader.extractMetadataFromJpegSegmentReader(Unknown
Source)
> 	at com.drew.imaging.jpeg.JpegMetadataReader.readMetadata(Unknown Source)
> 	at org.apache.tika.parser.image.ImageMetadataExtractor.parseJpeg(ImageMetadataExtractor.java:91)
> 	at org.apache.tika.parser.jpeg.JpegParser.parse(JpegParser.java:56)
> 	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
> 	at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
> 	at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message