Entityhub indexing tool is not able to initialise if the path contains a space
------------------------------------------------------------------------------
Key: STANBOL-568
URL: https://issues.apache.org/jira/browse/STANBOL-568
Project: Stanbol
Issue Type: Bug
Components: Entity Hub
Reporter: Rupert Westenthaler
Assignee: Rupert Westenthaler
Priority: Minor
If the path to the indexing tool contains a directory with a space, than the
initialization will fail like
Exception in thread "main" java.lang.IllegalStateException: Unable to copy
resources fromjar file
/Users/ale/Documents/text%20mining/stanbol/indici/org.apache.stanbol.entityhub.indexing.genericrdf-0.9.0-incubating-SNAPSHOT-jar-with-dependencies.jar!
at
org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig.copyFromClasspath(IndexingConfig.java:474)
at
org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig.getResource(IndexingConfig.java:384)
at
org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig.openResource(IndexingConfig.java:363)
at
org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig.openConfig(IndexingConfig.java:336)
at
org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig.loadConfig(IndexingConfig.java:570)
at
org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig.<init>(IndexingConfig.java:278)
at
org.apache.stanbol.entityhub.indexing.core.IndexerFactory.create(IndexerFactory.java:80)
at
org.apache.stanbol.entityhub.indexing.core.IndexerFactory.create(IndexerFactory.java:65)
at org.apache.stanbol.entityhub.indexing.Main.main(Main.java:66)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:99)
at
org.apache.stanbol.entityhub.indexing.core.config.IndexingConfig.copyFromClasspath(IndexingConfig.java:425)
... 8 more
Note the %20 in the file path.
Workaround:
==========
Do not use the indexing tools within a path that contains spaces
To Fix:
=====
IndexingConfig MUST URL decode the URL for resource loaded form the Classpath
* url loading in IndexingConfig#loadViaClasspath
* fix required in IndexingConfig#getConfigClasspathRootFolder
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira