Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoClassDefFoundError: cats/functor/Contravariant #136

Open
dcram opened this issue Mar 14, 2018 · 2 comments
Open

NoClassDefFoundError: cats/functor/Contravariant #136

dcram opened this issue Mar 14, 2018 · 2 comments

Comments

@dcram
Copy link

dcram commented Mar 14, 2018

Hi,

I am trying to run the example:

  import vegas._
  import vegas.render.WindowRenderer._

    val plot = Vegas("Country Pop").
      withData(
        Seq(
          Map("country" -> "USA", "population" -> 314),
          Map("country" -> "UK", "population" -> 64),
          Map("country" -> "DK", "population" -> 80)
        )
      ).
      encodeX("country", Nom).
      encodeY("population", Quant).
      mark(Bar)

    plot.show

But I get a:

Exception in thread "main" java.lang.NoClassDefFoundError: cats/functor/Contravariant
	at vegas.spec.Spec$LowPriorityImplicits$class.$init$(Spec.scala:1032)
	at vegas.spec.Spec$Implicits$.<init>(Spec.scala:2519)
	at vegas.spec.Spec$Implicits$.<clinit>(Spec.scala)
	at vegas.DSL.ExtendedUnitSpecBuilder.toJson(SpecDSL.scala:55)
	at vegas.DSL.SpecBuilder$SpecBuilderRenderOps$.window$extension(SpecDSL.scala:102)
	at ShowCalibrationFunction$$anonfun$main$1.apply(ShowCalibrationFunction.scala:54)
	at ShowCalibrationFunction$$anonfun$main$1.apply(ShowCalibrationFunction.scala:54)
	at vegas.render.ShowRender$$anon$1.apply(ShowRender.scala:12)
	at vegas.render.ShowRender$$anon$1.apply(ShowRender.scala:11)
	at vegas.DSL.SpecBuilder$SpecBuilderRenderOps$.show$extension(SpecDSL.scala:99)
	at ShowCalibrationFunction$.main(ShowCalibrationFunction.scala:54)
	at ShowCalibrationFunction.main(ShowCalibrationFunction.scala)
Caused by: java.lang.ClassNotFoundException: cats.functor.Contravariant
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 12 more

In my build.sbt:

import Dependencies._


lazy val commonSettings = Seq(
  organization := "fr.xxxxxxxxx",
  version := "0.1.0-SNAPSHOT",
  scalaVersion := "2.11.4",
  libraryDependencies += scalaTest % Test
)

lazy val root = (project in file(".")).
  settings(
    commonSettings,
    name := "xxxxxxxxxxxx",
    libraryDependencies ++= vegas
  )

In my Dependencies.scala:

  val vegasVersion = "0.3.11"
  lazy val vegas = Seq(
    "org.vegas-viz" %% "vegas" % vegasVersion
  )

What am I doing wrong ?

Thanks in advance for any help.

Damien

@nikita-volkov
Copy link

Just bumped into this. Looks like a conflict of the versions of the "cats" library used with some of the other deps

@MJFND
Copy link

MJFND commented Jun 2, 2020

Having the similar issue, using scala 2.11.12, can't see enough usage or issues around here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants