JohnLetnev / airhead-research

Automatically exported from code.google.com/p/airhead-research
0 stars 0 forks source link

New Stemmer is broken for jar files #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. The help description is incorrect as the class name needs to be fully
qualified:

java -jar bin/random-indexing.jar  -Z GermanStemmer -d build.xml /tmp/ri.sspace
java.lang.Error: java.lang.ClassNotFoundException: GermanStemmer
    at edu.ucla.sspace.util.Misc.getObjectInstance(Misc.java:39)
    at
edu.ucla.sspace.text.IteratorFactory.setProperties(IteratorFactory.java:228)
    at edu.ucla.sspace.mains.GenericMain.run(GenericMain.java:395)
    at edu.ucla.sspace.mains.RandomIndexingMain.main(RandomIndexingMain.java:184)
Caused by: java.lang.ClassNotFoundException: GermanStemmer
    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 edu.ucla.sspace.util.Misc.getObjectInstance(Misc.java:36)
    ... 3 more

2. Fully qualifying the class name causes an error the
org.tartarus.snoball.ext classes to not be found:

java -jar bin/random-indexing.jar  -Z edu.ucla.sspace.text.GermanStemmer -d
build.xml /tmp/ri.sspace
java.lang.NoClassDefFoundError: org/tartarus/snowball/ext/germanStemmer
    at edu.ucla.sspace.text.GermanStemmer.stem(GermanStemmer.java:39)
    at edu.ucla.sspace.text.StemmingIterator.next(StemmingIterator.java:88)
    at edu.ucla.sspace.text.StemmingIterator.next(StemmingIterator.java:43)
    at edu.ucla.sspace.ri.RandomIndexing.processDocument(RandomIndexing.java:472)
    at edu.ucla.sspace.mains.GenericMain$1.run(GenericMain.java:526)
Caused by: java.lang.ClassNotFoundException:
org.tartarus.snowball.ext.germanStemmer
    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)
    ... 5 more

Please use labels and text to provide additional information.

I think this has to do with how the build task is set to use lib/ but the
dist task doesn't build .jar file with the library classes incorporated in
them.  Ideally, the library classes should be built into the .jar

Original issue reported on code.google.com by David.Ju...@gmail.com on 16 Feb 2010 at 10:02

GoogleCodeExporter commented 9 years ago
Fixed.  I updated all the build rules to include all the class files and just 
exclude
the jnt library, since it isn't used.

Original comment by FozzietheBeat@gmail.com on 16 Feb 2010 at 5:10