You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by bish maten <bi...@gmail.com> on 2011/11/27 13:02:45 UTC

mahout command problems

I can run the examples under the mahout-distribution directory fine.
However cannot run the bin/mahout command, gives following errors.

mvn exec runs ok fine with mainClass (standard syntax) given (ran few
example classes from cf.taste and they run fine)


Following is command that gives error
mahout-distribution-0.5$ bin/mahout

no HADOOP_HOME set, running locally

> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/mahout/driver/MahoutDriver
> Caused by: java.lang.ClassNotFoundException:
> org.apache.mahout.driver.MahoutDriver
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> Could not find the main class: org.apache.mahout.driver.MahoutDriver.
> Program will exit.
>

Re: mahout command problems

Posted by Lance Norskog <go...@gmail.com>.
Independent of maven: you are using an old version of Mahout. You may find
that some of the programs work better in the trunk than in the 0.5 release.
Also, the wiki documentation generally moves forward with the current trunk
and so it may be confusing.

Re: mahout command problems

Posted by Grant Ingersoll <gs...@apache.org>.
mvn install is the better command for this stuff.

"mvn install -DskipTests"


On Nov 27, 2011, at 11:59 AM, Isabel Drost wrote:

> On 27.11.2011 bish maten wrote:
>> mvn compile done under subdirectory of mahout-distribution.
> 
> Did you also run a mvn package from the mahout root directory?
> 
> Isabel

--------------------------------------------
Grant Ingersoll
http://www.lucidimagination.com




Re: mahout command problems

Posted by Isabel Drost <is...@apache.org>.
On 27.11.2011 bish maten wrote:
> mvn compile done under subdirectory of mahout-distribution.

Did you also run a mvn package from the mahout root directory?

Isabel

Re: mahout command problems

Posted by bish maten <bi...@gmail.com>.
>
> now gives following error
>
> no HADOOP_HOME set, running locally
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
> details.
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/hadoop/util/ProgramDriver
>  at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:95)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.util.ProgramDriver
>  at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> at java.security.AccessController.doPrivileged(Native Method)
>  at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>  ... 1 more
>
>
> On Sun, Nov 27, 2011 at 7:42 AM, Sean Owen <sr...@gmail.com> wrote:
>
>> Yes I said 'mvn package' not compile
>> On Nov 27, 2011 12:36 PM, "bish maten" <bi...@gmail.com> wrote:
>>
>> > mvn compile done Build was successful (see below).
>> >
>> > Same problem (mahout-distribution-0.5$ bin/mahout
>> > no HADOOP_HOME set, running locally
>> > Exception in thread "main" java.lang.NoClassDefFoundError:
>> > org/apache/mahout/driver/MahoutDriver
>> > Caused by: java.lang.ClassNotFoundException:
>> > org.apache.mahout.driver.MahoutDriver
>> >    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>> >    at java.security.AccessController.doPrivileged(Native Method)
>> >    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>> >    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>> > Could not find the main class: org.apache.mahout.driver.MahoutDriver.
>> > Program will exit.
>> > )
>> >
>> >
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO] Reactor Summary:
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO] Apache Mahout ......................................... SUCCESS
>> > [2.887s]
>> > [INFO] Mahout Build Tools .................................... SUCCESS
>> > [0.864s]
>> > [INFO] Mahout Eclipse ........................................ SUCCESS
>> > [0.034s]
>> > [INFO] Mahout Math ........................................... SUCCESS
>> > [5.006s]
>> > [INFO] Mahout Core ........................................... SUCCESS
>> > [14.100s]
>> > [INFO] Mahout Taste Webapp ................................... SUCCESS
>> > [2.708s]
>> > [INFO] Mahout Utilities ...................................... SUCCESS
>> > [3.553s]
>> > [INFO] Mahout Examples ....................................... SUCCESS
>> > [9.014s]
>> > [INFO] Mahout Release Package ................................ SUCCESS
>> > [0.001s]
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO] BUILD SUCCESSFUL
>> > [INFO]
>> > ------------------------------------------------------------------------
>> > [INFO] Total time: 38 seconds
>> >
>>
>
>

Re: mahout command problems

Posted by Sean Owen <sr...@gmail.com>.
Yes I said 'mvn package' not compile
On Nov 27, 2011 12:36 PM, "bish maten" <bi...@gmail.com> wrote:

> mvn compile done Build was successful (see below).
>
> Same problem (mahout-distribution-0.5$ bin/mahout
> no HADOOP_HOME set, running locally
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/mahout/driver/MahoutDriver
> Caused by: java.lang.ClassNotFoundException:
> org.apache.mahout.driver.MahoutDriver
>    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> Could not find the main class: org.apache.mahout.driver.MahoutDriver.
> Program will exit.
> )
>
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Apache Mahout ......................................... SUCCESS
> [2.887s]
> [INFO] Mahout Build Tools .................................... SUCCESS
> [0.864s]
> [INFO] Mahout Eclipse ........................................ SUCCESS
> [0.034s]
> [INFO] Mahout Math ........................................... SUCCESS
> [5.006s]
> [INFO] Mahout Core ........................................... SUCCESS
> [14.100s]
> [INFO] Mahout Taste Webapp ................................... SUCCESS
> [2.708s]
> [INFO] Mahout Utilities ...................................... SUCCESS
> [3.553s]
> [INFO] Mahout Examples ....................................... SUCCESS
> [9.014s]
> [INFO] Mahout Release Package ................................ SUCCESS
> [0.001s]
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 38 seconds
>

Re: mahout command problems

Posted by bish maten <bi...@gmail.com>.
mvn compile done Build was successful (see below).

Same problem (mahout-distribution-0.5$ bin/mahout
no HADOOP_HOME set, running locally
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/mahout/driver/MahoutDriver
Caused by: java.lang.ClassNotFoundException:
org.apache.mahout.driver.MahoutDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: org.apache.mahout.driver.MahoutDriver.
Program will exit.
)


[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
------------------------------------------------------------------------
[INFO] Apache Mahout ......................................... SUCCESS
[2.887s]
[INFO] Mahout Build Tools .................................... SUCCESS
[0.864s]
[INFO] Mahout Eclipse ........................................ SUCCESS
[0.034s]
[INFO] Mahout Math ........................................... SUCCESS
[5.006s]
[INFO] Mahout Core ........................................... SUCCESS
[14.100s]
[INFO] Mahout Taste Webapp ................................... SUCCESS
[2.708s]
[INFO] Mahout Utilities ...................................... SUCCESS
[3.553s]
[INFO] Mahout Examples ....................................... SUCCESS
[9.014s]
[INFO] Mahout Release Package ................................ SUCCESS
[0.001s]
[INFO]
------------------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 38 seconds

Re: mahout command problems

Posted by Sean Owen <sr...@gmail.com>.
I think you need mvn package to create artifacts but that is just a first
simple guess.
On Nov 27, 2011 12:14 PM, "bish maten" <bi...@gmail.com> wrote:

> mvn compile done under subdirectory of mahout-distribution.
>

Re: mahout command problems

Posted by bish maten <bi...@gmail.com>.
mvn compile done under subdirectory of mahout-distribution.

Re: mahout command problems

Posted by Sean Owen <sr...@gmail.com>.
Did you build Mahout?
On Nov 27, 2011 12:03 PM, "bish maten" <bi...@gmail.com> wrote:

> I can run the examples under the mahout-distribution directory fine.
> However cannot run the bin/mahout command, gives following errors.
>
> mvn exec runs ok fine with mainClass (standard syntax) given (ran few
> example classes from cf.taste and they run fine)
>
>
> Following is command that gives error
> mahout-distribution-0.5$ bin/mahout
>
> no HADOOP_HOME set, running locally
>
> > Exception in thread "main" java.lang.NoClassDefFoundError:
> > org/apache/mahout/driver/MahoutDriver
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.mahout.driver.MahoutDriver
> >     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> >     at java.security.AccessController.doPrivileged(Native Method)
> >     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> >     at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> >     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
> >     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
> > Could not find the main class: org.apache.mahout.driver.MahoutDriver.
> > Program will exit.
> >
>