Yes. I put the .jar files under the lib/ directory of my own jar. I didn't set 
the Class-Path in MANIFEST.MF in the past. I just tried putting all jar files 
in the Class-Path of MANIFEST.MF, it still gave me the same exception. My 
experiment is a little bit different. It creates a Vector in the map function 
of the Mapper class. It worked correctly in the cluster.


From: Sean Owen <[email protected]>
To: [email protected]; Zhengguo 'Mike' SUN <[email protected]>
Sent: Monday, February 21, 2011 1:47 PM
Subject: Re: LanczosSolver and ClassNotFoundException

You are putting the .jar file in your larger .jar file, and then
setting Class-Path in MANIFEST.MF? Both are needed for that to work.
I'd guess that works also, but am not entirely sure. I always just
package into one .jar.

Your stack trace shows the class is not available in the Mapper. Was
your second experiment run locally? Maybe there is some difference
there.

On Mon, Feb 21, 2011 at 6:43 PM, Zhengguo 'Mike' SUN
<[email protected]> wrote:
>
> But the mising class org.apache.mahout.math.Vector is in the mahout-math jar 
> and I have already packaged it under /lib of my own jar. Also, my little 
> experiemnt showed that there is no problem to access the Vector class in 
> Mappers. Thus, I tend to think this may not be a dependency problem. The 
> exception was thrown when Hadoop tried to read the SequenceFile that has the 
> Vector class as the value. Is there any difference between accessing a class 
> in the Mapper (my little experiment) and accessing a class as the value of a 
> SequenceFile in RecordReader?
>
>


      

Reply via email to