meriems / luke

Automatically exported from code.google.com/p/luke
0 stars 0 forks source link

Luke doesn't seem to support custom analyzers #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Luke 1.0.0
OSX 10.6.2

I started Luke as follows:
 java -classpath
/Users/paul/code/MusicbrainzSearchServer/branches/ngs/index/target/index-2.0-SNA
PSHOT-jar-with-dependencies.jar
-jar lukeall-1.0.0.jar

specifying a jar containing my analyzer in the classpath

I then specified the analyzer on the Analysis Tab and did a search. The
search worked and brought back some results but then it complained it
couldn't find the analyzer (the analyzer does have a zero argument constructor)

and I had the following stacktrace at the command line:
java.lang.ClassNotFoundException:
org.musicbrainz.search.analysis.StandardUnaccentAnalyzer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at org.getopt.luke.Luke.createAnalyzer(Unknown Source)
    at org.getopt.luke.Luke.createQueryParser(Unknown Source)
    at org.getopt.luke.Luke.search(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at thinlet.Thinlet.invokeImpl(Unknown Source)
    at thinlet.Thinlet.invoke(Unknown Source)
    at thinlet.Thinlet.handleMouseEvent(Unknown Source)
    at thinlet.Thinlet.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Component.java:4714)
    at java.awt.Container.dispatchEventImpl(Container.java:2143)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
    at java.awt.Container.dispatchEventImpl(Container.java:2129)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
    at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296
)
    at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201
)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Original issue reported on code.google.com by paultay...@jthink.net on 15 Jan 2010 at 7:43

GoogleCodeExporter commented 9 years ago
If I'm not mistaken, when you specify -jar option then JDK ignores the 
-classpath
argument? You should probably use the following cmd-line:

java -classpath yourAnalyzers.jar:lukeall.jar org.getopt.luke.Luke

Original comment by sig...@gmail.com on 18 Jan 2010 at 5:15

GoogleCodeExporter commented 9 years ago
The issue of throwing exceptions should be fixed now (Issue 3). The other issue
related to -classpath versus -jar usage is invalid as far as I can tell.

Original comment by sig...@gmail.com on 31 Mar 2010 at 4:21