mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tharindu Rusira <tharindurus...@gmail.com>
Subject Re: java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
Date Thu, 28 Nov 2013 07:54:26 GMT
Yes that's the exact issue Suneel, it was a careless mistake while adding
projects to Eclipse that I missed those .jars.
I even messed with the code to find a workaround so that it does not
require these Precondition checks. (I've attached a patch if you are
interested) :)

Thanks a lot.
-Tharindu

On Thu, Nov 28, 2013 at 12:29 PM, Suneel Marthi <suneel_marthi@yahoo.com>wrote:

> you r missing Google Guava library which has these classes.  R u running a
> mvn build on Mahout snapshot?
>
>
>
>
>
> On Thursday, November 28, 2013 1:56 AM, Tharindu Rusira <
> tharindurusira@gmail.com> wrote:
>
> Hi all,
> I'm working on Mahout 0.9-SNAPSHOT version checked out from the svn trunk.
> The following code generates java.lang.NoClassDefFoundError:
> com/google/common/base/Preconditions where b is supposed to be true
> (because both cardinality and the values are same in the two vectors dv and
> sv)
>
> // --------------- start code -----------------
>
> double[] vals= new double[]{2.3, 2.56,4.66};
>
> DenseVector dv=new DenseVector(vals);
>
> Vector sv= new SequentialAccessSparseVector(3);
>
> for(int i=0;i<vals.length;i++){
>
>   sv.set(i,vals[i]);
>
> }
>
>
> boolean b=dv.equals(sv);
>
> System.out.println(b);
>
> // --------------- end code -----------------
>
>
> Where are the classes that execute these Preconditions? Are they shipped
> with Mahout or am I missing something (apparently com.google.common.base)
> in my standard Java library?
>
>
> Thanks,
>



-- 
M.P. Tharindu Rusira Kumara

Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.
+94757033733
www.tharindu-rusira.blogspot.com

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