NoSuchMethodError thrown with Scala 2.12
See original GitHub issueSummary
When running cucumber tests with cucumber-scala
(1.2.5) using Scala 2.12.1 or 2.12.0 a noSuchMethodError
is raised on startup
Here is a minimal project that reproduces the behaviour: https://github.com/randomcoder/cucumber-scala-2-12
Expected Behavior
The test cases should run
Current Behavior
The error below is thrown before any tests are executed
Exception in thread "main" java.lang.NoSuchMethodError: cucumber.api.scala.ScalaDsl.$init$(Lcucumber/api/scala/ScalaDsl;)V
at steps.SimpleScenarioSteps.<init>(SimpleScenarioSteps.scala:6)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at cucumber.runtime.scala.ScalaBackend$$anonfun$6.apply(ScalaBackend.scala:62)
at cucumber.runtime.scala.ScalaBackend$$anonfun$6.apply(ScalaBackend.scala:62)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike.map$(TraversableLike.scala:234)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at cucumber.runtime.scala.ScalaBackend.loadGlue(ScalaBackend.scala:62)
at cucumber.runtime.Runtime.<init>(Runtime.java:92)
at cucumber.runtime.Runtime.<init>(Runtime.java:70)
at cucumber.runtime.Runtime.<init>(Runtime.java:66)
at cucumber.api.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main.main(Main.java:18)
Steps to Reproduce (for bugs)
- In the sample project execute
sbt "run --dry-run --glue steps classpath:feature"
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:34 (11 by maintainers)
Top Results From Across the Web
java.lang.NoSuchMethodError: scala.Predef$.refArrayOps
This specific error happens when you use Scala 2.11 JAR files in Scala 2.12 projects. Scalatest is cross compiled with Scala 2.11 and...
Read more >java.lang.NoSuchMethodError in databricks
During run time, it throws me an error java.lang.NoSuchMethodError. The method exists in the package but still, I am getting this error.
Read more >Exception in thread "main" java.lang.NoSuchMethodError
The following error is encountered when migrating from Scala - 2.11, Akka - 2.5.14 To Scala - 2.12.10, Akka - 2.5.32 Exception in...
Read more >Search - appsloveworld
NoSuchMethodError : scala.Predef$.refArrayOps([Ljava/lang/Object ... Switch to Spark 2.4.0 or replace your libraries with scala 2.12 versions.
Read more >Trying to run ScalaTest compiled with 2.13.0-RC3 causes java ...
The following exception will be thrown. Exception in thread "ScalaTest-dispatcher" java.lang.NoSuchMethodError: scala.collection.JavaConverters.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @mpkorstanje! , looks good with oracle java 8 + scala 2.12.2 + cucucumber-scala 2.0.0-SNAPSHOT https://github.com/jecklgamis/cucumber-jvm-scala-example
Propagation delays aside it should be available right now.
Do note the changed groupId