You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Chris A. Mattmann (JIRA)" <ji...@apache.org> on 2015/11/14 22:17:11 UTC

[jira] [Comment Edited] (TIKA-1791) URI is not hierarchical exception when location model resource is inside a jar in classpath

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

Chris A. Mattmann edited comment on TIKA-1791 at 11/14/15 9:17 PM:
-------------------------------------------------------------------

Config XML in my mind is just one option for loading or setting properties - the ParseContext is supposed to be a more dynamic way of setting properties on a per parse invocation process. The problem with moving static paths into constructors is that we have too many places in Tika (starting with ServiceLoading as the most glaring) that expect zero arg constructors so we can't simply move these types of properties into the constructors until we figure out something better later.


was (Author: chrismattmann):
Config XML in my mind is just one option for loading or setting properties - the ParseContext is supposed to be a more dynamic way of setting properties on a per parse invocation process. The problem with moving static paths into constructors is that we have too many places in Tika (starting with ServiceLoading as the most glaring) that except zero arg constructors so we can't simply move these types of properties into the constructors until we figure out something better later.

> URI is not hierarchical exception when location model resource is inside a jar in classpath
> -------------------------------------------------------------------------------------------
>
>                 Key: TIKA-1791
>                 URL: https://issues.apache.org/jira/browse/TIKA-1791
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.11
>         Environment: location model  file is placed inside a fat Jar (with all the dependencies)
>            Reporter: Thamme Gowda N
>
> {code:title=Stacktrace|borderStyle=solid}
> The following error happens when location NER model resource is packaged inside a jar and GeoTopicParser is enabled.
> Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
> 	at java.io.File.<init>(File.java:418)
> 	at org.apache.tika.parser.geo.topic.GeoParserConfig.<init>(GeoParserConfig.java:33)
> 	at org.apache.tika.parser.geo.topic.GeoParser.<init>(GeoParser.java:54)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
> 	at java.lang.Class.newInstance(Class.java:442)
> 	at org.apache.tika.config.TikaConfig$XmlLoader.loadOne(TikaConfig.java:559)
> 	at org.apache.tika.config.TikaConfig$XmlLoader.loadOverall(TikaConfig.java:492)
> 	at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:166)
> 	at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:149)
> 	at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:142)
> 	at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:138)
> 	at edu.usc.cs.ir.cwork.tika.Parser.<init>(Parser.java:45)
> {code}
> Refernces :
> http://stackoverflow.com/questions/18055189/why-my-uri-is-not-hierarchical



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