mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Ghosh <neil.gh...@gmail.com>
Subject Re: Build Error in Twenty Newsgroups Classification Example
Date Tue, 21 Sep 2010 18:28:41 GMT
Thanks Ted.

I just found that my  [mvn install] on the root directory had completed with
error before trying this .
Then I did "cd" to "core" and "examples" and compiled and installed.Both
were  successful.

After that this command ran fine and I could run the example.


On Tue, Sep 21, 2010 at 11:51 PM, Ted Dunning <ted.dunning@gmail.com> wrote:

> Did you do [mvn -DskipTests install] at the top level before trying this?
>
>
> On Tue, Sep 21, 2010 at 9:15 AM, Neil Ghosh <neil.ghosh@gmail.com> wrote:
>
>> Hi ,
>>
>> I am trying to run the example using Mahout 0.3 at
>> https://cwiki.apache.org/confluence/display/MAHOUT/Twenty+Newsgroups
>>
>> I have carried out all the steps but getting build error during this
>> command
>>
>> mvn -e exec:java \
>>
>>  -Dexec.mainClass=org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups
>> \
>>      -Dexec.args="-p 20news-18828 \
>>                   -o 20news-input \
>>                   -a org.apache.lucene.analysis.standard.StandardAnalyzer
>> \
>>                   -c UTF-8"
>>
>>
>> Please help, getting the following error.
>>
>> neil@neil-laptop:~/workspace/mahout-0.3/examples$ mvn -e exec:java \
>> >
>>
>> -Dexec.mainClass=org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups
>> \
>> >       -Dexec.args="-p 20news-18828 \
>> >                    -o 20news-input \
>> >                    -a
>> org.apache.lucene.analysis.standard.StandardAnalyzer
>> \
>> >                    -c UTF-8"
>> + Error stacktraces are turned on.
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'exec'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building Mahout Examples
>> [INFO]    task-segment: [exec:java]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing exec:java
>> [INFO] No goals needed for project - skipping
>> [INFO] [exec:java {execution: default-cli}]
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] An exception occured while executing the Java class. null
>>
>> Unresolved compilation problems:
>>    DefaultOptionCreator cannot be resolved
>>    CommandLineUtil cannot be resolved
>>    BayesFileFormatter cannot be resolved
>>    CommandLineUtil cannot be resolved
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> org.apache.maven.lifecycle.LifecycleExecutionException: An exception
>> occured
>> while executing the Java class. null
>>    at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
>>    at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
>>    at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
>>    at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>>    at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>>    at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>>    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>>    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>>    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>>    at
>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>    at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>    at java.lang.reflect.Method.invoke(Method.java:616)
>>    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>>    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>>    at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>>    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: An exception
>> occured while executing the Java class. null
>>    at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:346)
>>    at
>>
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>>    at
>>
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>>    ... 17 more
>> Caused by: java.lang.reflect.InvocationTargetException
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at
>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>    at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>    at java.lang.reflect.Method.invoke(Method.java:616)
>>    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:291)
>>    at java.lang.Thread.run(Thread.java:636)
>> Caused by: java.lang.Error: Unresolved compilation problems:
>>    DefaultOptionCreator cannot be resolved
>>    CommandLineUtil cannot be resolved
>>    BayesFileFormatter cannot be resolved
>>    CommandLineUtil cannot be resolved
>>
>>    at
>>
>> org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups.main(PrepareTwentyNewsgroups.java:52)
>>    ... 6 more
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 3 seconds
>> [INFO] Finished at: Tue Sep 21 21:41:25 IST 2010
>> [INFO] Final Memory: 14M/34M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>>
>> --
>> Thanks and Regards
>> Neil
>> http://neilghosh.com
>>
>
>


-- 
Thanks and Regards
Neil
http://neilghosh.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message