[ https://issues.apache.org/jira/browse/LUCENE-5956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14621838#comment-14621838 ]
Trejkaz commented on LUCENE-5956: --------------------------------- The class loader approach is definitely turning out to be problematic. It all worked in testing, but now that it's in a jar, it looks like I have found a bug in JarURLConnection on the Oracle JVM where it's calling indexOf instead of lastIndexOf to split the jar URL, which results in failing to parse the URL correctly and throwing a MalformedURLException. URLClassLoader uses java.net.URL exclusively to load resources, so it can't be used. I'm not sure how other people work around this but I guess the options are: (a) Unpack the embedded jar to a normal file path. (b) Write a completely new URLClassLoader which avoids using URL to do any loading, except of course the jar file itself has to be accessible via URL, because that's the only thing ClassLoader will give me to work with. (c) Avoid using nested jars and just nest the actual class files, but off in a hidden directory. But still treat them as resources, so the original names can be used. (d) Give up and just go back to renaming the Lucene packages and suffer the autocomplete encouraging completing the wrong class from time to time. (e) Other ideas I haven't considered. > Add runnable index upgrader > --------------------------- > > Key: LUCENE-5956 > URL: https://issues.apache.org/jira/browse/LUCENE-5956 > Project: Lucene - Core > Issue Type: New Feature > Reporter: Ryan Ernst > > As a spinoff from discussion in LUCENE-5940, I'd like to add a new module > "lucene-upgrader", move {{IndexUpgrader}} to this, and add embed older > versions of lucene (just enough to upgrade indexes) in the built version of > the module's jar. This would be runnable from the command line with > something like: > {{java -jar lucene-upgrader-4.11.0.jar /path/to/index}} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org