Note that there are some explanatory texts on larger screens.

plurals
  1. POjava.lang.NoSuchMethodException resulting from incorrect classpath?
    primarykey
    data
    text
    <p>I am having, what I can only guess is a schoolboy error with the classpath while trying to execute the following command (Mahout and Lucene are from Apache):</p> <pre><code>bin/mahout seq2sparse -i &lt;input-dir&gt; -o &lt;output-dir&gt; -wt tfidf -chunk 50 \ -a org.apache.lucene.analysis.standard.StandardAnalyzer --minSupport 2\ --minDF 2 --maxDFPercent 75 --norm 2 </code></pre> <p>This gives me the error:</p> <pre><code>Exception in thread "main" java.lang.IllegalStateException: java.lang.NoSuchMethodException: org.apache.lucene.analysis.standard.StandardAnalyzer.&lt;init&gt;() at org.apache.mahout.common.ClassUtils.instantiateAs(ClassUtils.java:68) at org.apache.mahout.vectorizer.SparseVectorsFromSequenceFiles.run(SparseVectorsFromSequenceFiles.java:204) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) at org.apache.mahout.vectorizer.SparseVectorsFromSequenceFiles.main(SparseVectorsFromSequenceFiles.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68) at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139) at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:156) Caused by: java.lang.NoSuchMethodException: org.apache.lucene.analysis.standard.StandardAnalyzer.&lt;init&gt;() at java.lang.Class.getConstructor0(Class.java:2706) at java.lang.Class.getConstructor(Class.java:1657) at org.apache.mahout.common.ClassUtils.instantiateAs(ClassUtils.java:62) ... 16 more </code></pre> <p>The method expected is part of the Apache Lucene library, it is not my own code. I have added the Lucene jars to the classpath using the following: <code>export CLASSPATH=$CLASSPATH:mahout-distribution-0.6/lib/*</code></p> <p>As a side note, there is no autocompletion when specifying the class at the "-a" flag. Is this an indication of my jar not being visible? I had this autocompletion on another system.</p> <p>My machine is running Java(TM) SE Runtime Environment (build 1.6.0_26-b03)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload