Sunday, December 27, 2015

Intellij not adding things to the classpath - Exception in thread "main" java.lang.NoSuchMethodError: shapeless.Witness$.mkWitness(Ljava/lang/Object;)Lshapeless/Witness;

Using Intellij? Just added circe (or shapeless, I'm guessing)? Seeing these sorts of exceptions?


Exception in thread "main" java.lang.NoSuchMethodError: shapeless.Witness$.mkWitness(Ljava/lang/Object;)Lshapeless/Witness;
at Example$fresh$macro$73$1.inst$macro$1$lzycompute(PicklingApp.scala:26)
at Example$fresh$macro$73$1.inst$macro$1(PicklingApp.scala:26)
at Example$.delayedEndpoint$Example$1(PicklingApp.scala:26)
at Example$delayedInit$body.apply(PicklingApp.scala:16)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at Example$.main(PicklingApp.scala:16)
at Example.main(PicklingApp.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Just restart Intellij. It's become confused about the classpath.