pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.07k stars 476 forks source link

java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less #675

Open pijushcse opened 6 years ago

pijushcse commented 6 years ago

Hi ,

I have a sample Pact consumer test. I was trying to test a POST call but looks like I am getting below exception. I am using jvm-consumer and jvm-producer with version 3.5.15

Exception in thread "Thread-2" java.lang.NoSuchMethodError: scala.Predef$.$conforms()Lscala/Predef$$less$colon$less; at au.com.dius.pact.model.Matching$.javaMapToScalaMap3(Matching.scala:104) at au.com.dius.pact.model.Matching$.matchQuery(Matching.scala:178) at au.com.dius.pact.model.RequestMatching$.requestMismatches(RequestMatching.scala:52) at au.com.dius.pact.model.RequestMatching$.compareRequest(RequestMatching.scala:43) at au.com.dius.pact.model.RequestMatching.au$com$dius$pact$model$RequestMatching$$compareToActual$1(RequestMatching.scala:12) at au.com.dius.pact.model.RequestMatching$$anonfun$1.apply(RequestMatching.scala:13) at au.com.dius.pact.model.RequestMatching$$anonfun$1.apply(RequestMatching.scala:13) 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.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) at scala.collection.AbstractTraversable.map(Traversable.scala:105) at au.com.dius.pact.model.RequestMatching.matchInteraction(RequestMatching.scala:13) at au.com.dius.pact.consumer.BaseMockServer.generatePactResponse(MockHttpServer.kt:106) at au.com.dius.pact.consumer.BaseMockServer.handle(MockHttpServer.kt:78) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82) at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647) at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:158) at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:431) at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:396) at java.lang.Thread.run(Thread.java:748)

Any idea?

uglyog commented 6 years ago

This may be related to #639

Could you provide a list dependencies you run your test with? My assumption is you have a mismatch with versions of Scala.