tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derrick Johnson (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TIKA-1163) NPE thrown by TikaConfig.getDefaultConfig()
Date Fri, 23 Aug 2013 20:15:53 GMT

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

Derrick Johnson edited comment on TIKA-1163 at 8/23/13 8:14 PM:
----------------------------------------------------------------

Please see this link, filed two years ago by someone else. I've been tracing through the debugger,
and the point of failure is exactly the same. It is inside the `MimeTypesFactory.create(URL...
urls)` method.

http://www.experts-exchange.com/Programming/Languages/Java/Q_27048617.html

Yet another report:
http://grokbase.com/t/tika/user/1188b4kh2f/get-nullpointerexception-using-getdefaultconfig
                
      was (Author: dajohnson89):
    Please see this link, filed two years ago by someone else. I've been tracing through the
debugger, and the point of failure is exactly the same. It is inside the `MimeTypesFactory.create(URL...
urls)` method.

http://www.experts-exchange.com/Programming/Languages/Java/Q_27048617.html
                  
> NPE thrown by TikaConfig.getDefaultConfig() 
> --------------------------------------------
>
>                 Key: TIKA-1163
>                 URL: https://issues.apache.org/jira/browse/TIKA-1163
>             Project: Tika
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: OS-X, JDK 1.7
>            Reporter: Derrick Johnson
>
> The below exception gets thrown every time I execute TikaConfig.getDefaultConfig. Similary,
invoking `Tika t = new Tika()` throws the same exception, since code inside this constructor
invokes TikaConfig.getDefaultConfig().
> This problem is non-existent when I use Tika-core and Tika-parsers 1.0. But when bump
the version numbers to 1.2 (in order to get around a bug in PDFBOX), the problem shows up.
I'm using maven. I've carefully ensured that I'm not pulling in the wrong version of Tika,
using things like `mvn dependency:tree` and making there were no sneaky problematic transitive
dependencies. 
> java.lang.NullPointerException
> 	at org.apache.tika.mime.MimeTypesReader$ClauseRecord.stop(MimeTypesReader.java:245)
> 	at org.apache.tika.mime.MimeTypesReader.endElement(MimeTypesReader.java:203)
> 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)
> 	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1303)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
> 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
> 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
> 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
> 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
> 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
> 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
> 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
> 	at org.apache.tika.mime.MimeTypesReader.read(MimeTypesReader.java:115)
> 	at org.apache.tika.mime.MimeTypesFactory.create(MimeTypesFactory.java:64)
> 	at org.apache.tika.mime.MimeTypesFactory.create(MimeTypesFactory.java:93)
> 	at org.apache.tika.mime.MimeTypesFactory.create(MimeTypesFactory.java:149)
> 	at org.apache.tika.mime.MimeTypes.getDefaultMimeTypes(MimeTypes.java:479)
> 	at org.apache.tika.config.TikaConfig.getDefaultMimeTypes(TikaConfig.java:60)
> 	at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:169)
> 	at org.apache.tika.config.TikaConfig.getDefaultConfig(TikaConfig.java:268)
>         at 
> my.method.which.invokes `new Tika()`

--
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