mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <sro...@gmail.com>
Subject Re: Creating Multinomial Random numbers with Mahout
Date Fri, 04 Sep 2009 23:00:58 GMT
Well, sounds like you are loading classes that need Hadoop, and you
have not put Hadoop in your classpath.

These questions aren't particularly specific to Mahout -- I think
you'd benefit from learning a bit more about how Java works first.
It'll get you past a lot of small issues like this.

On Fri, Sep 4, 2009 at 11:55 PM, Sven Boekhoff<sven@boekhoff.info> wrote:
> It does nor work.
> It throws the error:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/hadoop/io/Writable
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>        at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.io.Writable
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>        ... 12 more
> Could not find the main class: Main.  Program will exit.
>
> Do I need the hadoop library? This is not written in the requirements,...
>
>
> Sean Owen wrote:
>>
>> I think you probably want to study basic Java first then or you're
>> going to run into a lot more confusion.
>>
>> Vector probabilities = new SparseVector();
>>
>> is what you want. Interfaces and instantiating objects are the very
>> basics of Java.
>>
>> On Fri, Sep 4, 2009 at 5:30 PM, Sven Boekhoff<sven@boekhoff.info> wrote:
>>>
>>> I never worked with interfaces.
>>> And i also don't know what "instantiate an implementation" means.
>>> How does it look like?
>>>
>>> Sean Owen wrote:
>>>>
>>>> Yes, Vector is an interface! You need to instantiate an implementation
>>>> like DenseVector.
>>>>
>>>> On Fri, Sep 4, 2009 at 5:25 PM, Sven Boekhoff<sven@boekhoff.info> wrote:
>>>>>
>>>>> But i cant create an Vector object:
>>>>>
>>>>> Vector probabilities = new Vector();
>>>>>
>>>>> gives an error.
>>>>>
>

Mime
View raw message