my index files is this r...@master:/home/zhoufeng/newdisk/newindex# ls _0.cfs _0.cfx segments_2 segments.gen
2009/10/21 周峰 <[email protected]> > yes,you are right.thank you very much.i add some jarfiles ,then the > Exception is disappeared. > but now i meet a new problem > r...@master:/home/zhoufeng/mahout/trunk/core/target/dependency# java -cp > /home/zhoufeng/mahout/trunk/utils/target/mahout-utils-0.2-SNAPSHOT.jar:lucene-core-2.9.0.jar:slf4j-api-1.5.8.jar:slf4j-jcl-1.5.8.jar:commons-logging-1.1.1.jar > org.apache.mahout.utils.vectors.lucene.Driver --dir > /home/zhoufeng/newdisk/newindex --field body --dictOut > /home/zhoufeng/newdisk/newindex/dict.txt --output > /home/zhoufeng/newdisk/newindex/out.txt -max 50 > Exception in thread "main" java.lang.ExceptionInInitializerError > at org.apache.mahout.utils.vectors.lucene.Driver.main(Driver.java:65) > Caused by: java.util.MissingResourceException: Can't find bundle for base > name org.apache.commons.cli2.resource.CLIMessageBundle_en_US, locale en_US > at > java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521) > at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260) > at java.util.ResourceBundle.getBundle(ResourceBundle.java:787) > at > org.apache.commons.cli2.resource.ResourceHelper.<init>(ResourceHelper.java:72) > at > org.apache.commons.cli2.resource.ResourceHelper.getResourceHelper(ResourceHelper.java:87) > at > org.apache.commons.cli2.builder.ArgumentBuilder.<clinit>(ArgumentBuilder.java:34) > ... 1 more > i do not know what it is meaning > > > > 2009/10/21 Robin Anil <[email protected]> > > you would need to add all the jarfiles infrom core/target/dependency to >> your >> classpath >> alternately, you can just use the mahout-core-0.2-SNAPSHOT.job file (which >> has all the dependecies bundled in it) >> Robin >> >> >> On Wed, Oct 21, 2009 at 1:34 PM, 周峰 <[email protected]> wrote: >> >> > At first,i have built a Lucene index in my directory >> > "/home/zhoufeng/newdisk/newindex",then i want to create Vectors from the >> > index files. >> > then i met a problem >> > r...@master:/home/zhoufeng/mahout/trunk/utils/target# java -cp >> > >> > >> mahout-utils-0.2-SNAPSHOT.jar:/home/zhoufeng/mahout/trunk/core/target/mahout-core-0.2-SNAPSHOT.jar >> > org.apache.mahout.utils.vectors.lucene.Driver --dir >> > /home/zhoufeng/newdisk/newindex string --dictOut >> > /home/zhoufeng/newdisk/newindex/dict.txt --output >> > /home/zhoufeng/newdisk/newindex/out.txt -max 50 >> > Exception in thread "main" java.lang.NoClassDefFoundError: >> > org/apache/commons/cli2/OptionException >> > Caused by: java.lang.ClassNotFoundException: >> > org.apache.commons.cli2.OptionException >> > 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:307) >> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:252) >> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) >> > Could not find the main class: >> > org.apache.mahout.utils.vectors.lucene.Driver. Program will exit. >> > >> > i do not know where is the java file >> > "org.apache.commons.cli2.OptionException". >> > Is It because some jar file is absent? >> > >> > can anyone help me? thanks >> > >> > >
