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.NoClassDefFoundError: cats/free/Inject$ building master #54

Open
ml10 opened this issue Apr 25, 2017 · 0 comments
Open

java.lang.NoClassDefFoundError: cats/free/Inject$ building master #54

ml10 opened this issue Apr 25, 2017 · 0 comments

Comments

@ml10
Copy link

ml10 commented Apr 25, 2017

I was going to see if I could debug why the Applicative composition exercise doesn't display correctly and in trying to build exercises-cats, I ran into the NoClassDefFoundError above.

I checked on another computer and then tried the hseeberger/scala-sbt docker image to make sure I was starting clean. I got the same result all three times.

Steps to reproduce with hseeberger/scala-sbt docker image:

  1. sudo docker run -it --rm hseeberger/scala-sbt
  2. git clone https://github.com/scala-exercises/exercises-cats.git
  3. cd exercises-cats/
  4. sbt compile publishLocal

These steps should yield this stack trace:

java.lang.NoClassDefFoundError: cats/free/Inject$
	at github4s.Github.repos$lzycompute(Github.scala:40)
	at github4s.Github.repos(Github.scala:40)
	at org.scalaexercises.compiler.Compiler.org$scalaexercises$compiler$Compiler$$fetchContributions$1(Compiler.scala:163)

As a quick attempt to fix this, I added cats-free to the build.sbt file, and this yielded another stack trace.

java.lang.NoSuchMethodError: cats.free.Free.foldMap(Lcats/arrow/FunctionK;Lcats/Monad;)Ljava/lang/Object;
	at github4s.Github$GithubIOSyntaxEither.execK(Github.scala:58)
	at github4s.Github$GithubIOSyntaxEither.exec(Github.scala:64)
	at org.scalaexercises.compiler.Compiler.org$scalaexercises$compiler$Compiler$$fetchContributions$1(Compiler.scala:167)

It looks like I need another version of cats-free, but I'm not sure which one.

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

1 participant