Unable to find a solution to this stacktrace I'll answer this question so may be of use to others.
When attempt to run a ScalaTest file :
import org.scalatest.FlatSpec
class DataTest extends FlatSpec {
"Number of Links" should "be" in {
assert(2 === 2)
}
}
i receive this exception :
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.eclipse.scalatest.launching.ScalaTestLauncher$.main(ScalaTestLauncher.scala:22)
at scala.tools.eclipse.scalatest.launching.ScalaTestLauncher.main(ScalaTestLauncher.scala)
Caused by: java.lang.NoSuchMethodError: scala.collection.IterableLike.elements()Lscala/collection/Iterator;
at org.scalatest.tools.Runner$.checkArgsForValidity(Runner.scala:611)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:500)
at org.scalatest.tools.Runner$.main(Runner.scala:476)
at org.scalatest.tools.Runner.main(Runner.scala)
... 6 more
What is the issue ?
Issue was the version of ScalaTest. Project was using :
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest</artifactId>
<version>1.3</version>
</dependency>
But required
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.10</artifactId>
<version>2.2.0</version>
</dependency>