Hi Robert,
For Lucene Java issues, try [EMAIL PROTECTED], you will get much
better help in the future.
The issue appears to be that you need to include the actual JAR files
in the classpath, the directory containing them is not sufficient.
See http://www.gossamer-threads.com/lists/lucene/java-user/50132?
search_string=ERROR%20opening%20the%20Index;#50132 for a similar
discussion (which also can be applied to Lucene 2.2.0)
Cheers,
Grant
On Jun 22, 2007, at 11:49 AM, Robert Mullin wrote:
1)I have downloaded and unpacked the Lucene tar.gz file
2)the successfully unpacked and installed files reside in a directory:
/usr/local/bin/Lucene/
3)echo $CLASSPATH returns: .:/usr/local/bin/Lucene/
. . . which is the directory in which reside the two .jar files, core
& demos, as well as the src directory;
4)from within my Lucene directory, I issue the following command (as
indicated in instructions at
lucene.apache.org/java/docs/demo.html):
java org.apache.lucene.demo.IndexFiles /usr/local/bin/Lucene/src
5)I receive the following error message:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/lucene/demo/IndexFiles
6)if I change my permission level to su and then issue the same
command, I receive the following error message:
Exception in thread "main" java.lang.NoClassDefFoundError:
org.apache.lucene.demo.IndexFiles
at gnu.java.lang.MainThread.run(libgcj.so.70)
Caused by: java.lang.ClassNotFoundException:
org.apache.lucene.demo.IndexFiles not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/usr/local/bin/
Lucene/],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.70)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at gnu.java.lang.MainThread.run(libgcj.so.70)
Any suggestions? Clearly I am a novice in matters Javan . . . but
learning rapidly . . . I feel certain that this
can be resolved with a small "path" change of some sort . . . but
Zeus be damned if I know what it is.
Java program in general appears to be properly installed. Recently
downloaded from the Sun site.
I am able to compile and run other *.java files from my tutorial
directory. . . .
Thanks in advance for any help that might be forthcoming. I've
stepped through the directions several times . . . to no avail.
I have looked at the FAQ and browsed the list archives, but find
nothing so fundamental.
Cordially,
R. Mullin
--------------------------
Grant Ingersoll
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp
Read the Lucene Java FAQ at http://wiki.apache.org/lucene-java/LuceneFAQ