mahout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Dunning (JIRA)" <>
Subject [jira] [Created] (MAHOUT-1006) Example from book no longer works - prepare20newsgroups broken with Lucene upgrade
Date Thu, 03 May 2012 18:10:52 GMT
Ted Dunning created MAHOUT-1006:

             Summary: Example from book no longer works - prepare20newsgroups broken with
Lucene upgrade
                 Key: MAHOUT-1006
             Project: Mahout
          Issue Type: Bug
    Affects Versions: 0.7
            Reporter: Ted Dunning
            Assignee: Ted Dunning
            Priority: Critical
             Fix For: 0.7

The StandardAnalyzer from Lucene no longer has a no-args constructor.  Our code uses reflection
to create this class, but looks for a no-args constructor and that causes this:

./bin/mahout prepare20newsgroups -p 20news-bydate-train/ -o 20news-train/ -a org.apache.lucene.analysis.standard.StandardAnalyzer
-c UTF-8  
MAHOUT_LOCAL is not set; adding HADOOP_CONF_DIR to classpath.
no HADOOP_HOME set, running locally
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/hadoop/mahout/examples/target/mahout-examples-0.7-SNAPSHOT-job.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/hadoop/mahout/examples/target/dependency/slf4j-jcl-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/hadoop/mahout/examples/target/dependency/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See for an explanation.
Exception in thread "main" java.lang.IllegalStateException: java.lang.NoSuchMethodException:
	at org.apache.mahout.common.ClassUtils.instantiateAs(
	at org.apache.mahout.common.ClassUtils.instantiateAs(
	at org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups.main(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(
	at org.apache.hadoop.util.ProgramDriver.driver(
	at org.apache.mahout.driver.MahoutDriver.main(
Caused by: java.lang.NoSuchMethodException: org.apache.lucene.analysis.standard.StandardAnalyzer.<init>()
	at java.lang.Class.getConstructor0(
	at java.lang.Class.getConstructor(
	at org.apache.mahout.common.ClassUtils.instantiateAs(
	... 9 more

This is really bad.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message