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

java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV(Ljava/lang/Object;)Lscalaz/syntax/ValidationV; #221

Closed
jagatsingh opened this issue Sep 15, 2014 · 14 comments

Comments

@jagatsingh
Copy link

Hi,

You will get the below error if we dont keep plugins.sbt in correct place.

Documenting for helping others not to waste time.

Eclipse 4.4

java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV(Ljava/lang/Object;)Lscalaz/syntax/ValidationV;

Added the required plugin settings in

/.sbt/0.13/plugins/plugins.sbt

full log is below.

[info] About to create Eclipse project files for your project(s).
java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV(Ljava/lang/Object;)Lscalaz/syntax/ValidationV;
        at com.typesafe.sbteclipse.core.package$.setting(package.scala:66)
        at com.typesafe.sbteclipse.core.Eclipse$.skipParents(Eclipse.scala:495)
        at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action$1.apply$mcZ$sp(Eclipse.scala:103)
        at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action$1.apply(Eclipse.scala:103)
        at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action$1.apply(Eclipse.scala:103)
        at scala.Option.getOrElse(Option.scala:120)
        at com.typesafe.sbteclipse.core.Eclipse$.action(Eclipse.scala:103)
        at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:82)
        at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:82)
        at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
        at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)
        at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
        at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
        at sbt.Command$.process(Command.scala:95)
        at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:87)
        at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:87)
        at sbt.State$$anon$1.process(State.scala:176)
        at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:87)
        at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:87)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
        at sbt.MainLoop$.next(MainLoop.scala:87)
        at sbt.MainLoop$.run(MainLoop.scala:80)
        at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:69)
        at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:66)
        at sbt.Using.apply(Using.scala:25)
        at sbt.MainLoop$.runWithNewLog(MainLoop.scala:66)
        at sbt.MainLoop$.runAndClearLast(MainLoop.scala:49)
        at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:33)
        at sbt.MainLoop$.runLogged(MainLoop.scala:25)
        at sbt.xMain.run(Main.scala:26)
        at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
        at xsbt.boot.Launch$.run(Launch.scala:109)
        at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
        at xsbt.boot.Launch$.launch(Launch.scala:117)
        at xsbt.boot.Launch$.apply(Launch.scala:19)
        at xsbt.boot.Boot$.runImpl(Boot.scala:44)
        at xsbt.boot.Boot$.main(Boot.scala:20)
        at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV(Ljava/lang/Object;)Lscalaz/syntax/ValidationV;

@rafael
Copy link

rafael commented Oct 27, 2014

I'm getting this error too. What was the setting you added to fix it? @jagatsingh

Thanks!

@channingwalton
Copy link

@jagatsingh any chance you could tell us what the settings were?

@benmccann
Copy link
Contributor

Can you try with sbteclipse 4.0.0-RC1?

@fellz
Copy link

fellz commented Apr 20, 2015

@benmccann got this bug when used sbteclipse plugin 4.0.0-RC1

here is complete plugins.sbt

resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0-RC1")

// web plugins

addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")

myapp/project/plugins.sbt
sbt 0.13.8
myapp was made via activator new myapp

@benmccann
Copy link
Contributor

sbteclipse 4.0.0 won't work with Play 2.3 unfortunately. You can try with Play 2.4-M3

@zakpatterson
Copy link

Getting the same error with sbt-eclipse 4.0.0-RC1 and Play 2.4.0-M3

Actually the stacktrace is not quite the same:

> eclipse
[info] About to create Eclipse project files for your project(s).
java.lang.NoSuchMethodError: com.typesafe.sbteclipse.core.package$.setting(Lsbt/SettingKey;Lsbt/State;)Lscalaz/Validation;
at play.PlayEclipse$$anon$6.createTransformer(PlayEclipse.scala:84)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6$$anonfun$apply$4$$anonfun$7.apply(Eclipse.scala:127)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6$$anonfun$apply$4$$anonfun$7.apply(Eclipse.scala:127)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6$$anonfun$apply$4.apply(Eclipse.scala:127)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6$$anonfun$apply$4.apply(Eclipse.scala:121)
at scala.Option$WithFilter.map(Option.scala:206)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6.apply(Eclipse.scala:121)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$6.apply(Eclipse.scala:120)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
at com.typesafe.sbteclipse.core.Eclipse$.handleProjects(Eclipse.scala:120)
at com.typesafe.sbteclipse.core.Eclipse$.action(Eclipse.scala:104)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:85)
at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:85)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
at sbt.Command$.process(Command.scala:92)

@benmccann
Copy link
Contributor

Oh, I know what this is now. I was confused at first and thought it was something else. This will be fixed in Play 2.4-RC1, which should be released any day now. I'm going to close this issue since it's already been fixed in Play.

@rashmitrathod
Copy link

I was referencing sbteclipse version 4.0.0 which was giving this exception, However I could able to fix this issue by updating my sbteclipse version from 4.0.0 to 3.0.0 in global plugin.sbt (available in <USER_HOME>.sbt\0.13\plugins) file.

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")

@vito-c
Copy link

vito-c commented Aug 27, 2015

I get this error with version 2.5.0, 3.0.0 and 4.0.0 @benmccann is there another version I can try?

@benmccann
Copy link
Contributor

I think this error was conflicting versions of scalaz? You must be pulling in another version somewhere else in your project

@vito-c
Copy link

vito-c commented Aug 27, 2015

is there a version of sbteclipse compatible with "org.scalaz" %% "scalaz-core" % "7.1.2"?

@vito-c
Copy link

vito-c commented Sep 1, 2015

@benmccann we are using scalaz-core 7.1.2 and sbteclipse is using 7.1.0 shouldn't these two version be compatible?

I tried bumping my version of sbteclipse and then that wasn't compatible with sbt-play 2.3.9 I tried bumping my play to 2.4.0 and there was errors. I will try 3.0.0 later :(

@oswaldo
Copy link

oswaldo commented Jul 4, 2016

Just in case someone hits this one again, it might be triggered by other enabled plugins. In my case, the issue/conflict with version 3.0.0 is triggered by ~/.sbt/0.13/plugins/coursier.sbt with addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M12")

@durban
Copy link

durban commented Aug 29, 2016

And there is a similar issue with version 4.0.0 and coursier 1.0.0-M14 (due to alexarchambault/coursier/pull/328).

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

10 participants