Hi Marcelo,
   I am not including Spark's classes. When I used the userClasspathFirst
flag, I started getting those errors.

Been there, done that. Removing guava classes was one of the first things I
tried.

I saw your replies to a similar problem from Sept.

http://apache-spark-developers-list.1001551.n3.nabble.com/guava-version-conflicts-td8480.html

It looks like my issue is the same cause, but different symptoms.

Thanks,
Pradeep.

On Fri, Apr 10, 2015 at 12:51 PM, Marcelo Vanzin <van...@cloudera.com>
wrote:

> On Fri, Apr 10, 2015 at 10:11 AM, Pradeep Rai <prai...@gmail.com> wrote:
> > I tried the userClasspathFirst flag. I started getting NoClassDeFound
> > Exception for spark classes like Function2, etc.
>
> Wait. Are you including Spark classes in your app's assembly? Don't do
> that...
>
> As for Guava, yeah, the mess around Optional and friends is
> unfortunate. One way you could try to work around it, if excluding
> Spark classes and the userClassPathFirst option doesn't work, is to
> explicitly remove the Optional (and related) classes from your app's
> fat jar, and cross your fingers.
>
> --
> Marcelo
>

Reply via email to