Migration to Newer Gatling from 2.0.0-M3a

Hi Chloe,

It seems that you didn’t upgrade the Maven Plugin along with Gatling itself.
Can you try with the latest version for both, 2.1.7?

Cheers,

Pierre

Is that the scala-maven plugin?

In that case, gatling-maven-plugin.

Did that, here’s the error list this time:

Engine.scala:9: value requestBodiesDirectory is not a member of io.gatling.core.config.GatlingPropertiesBuilder 11:24:23.392 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - props.requestBodiesDirectory(IDEPathHelper.requestBodiesDirectory.toString) 11:24:23.393 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - ^ 11:24:23.628 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - xxx/Recorder.scala:9: value requestBodiesFolder is not a member of io.gatling.recorder.config.RecorderPropertiesBuilder 11:24:23.629 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - props.requestBodiesFolder(IDEPathHelper.requestBodiesDirectory.toString) 11:24:23.629 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - ^ 11:24:23.758 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - xxx/Recorder.scala:11: type mismatch; found : scala.reflect.io.File required: java.nio.file.Path 11:24:23.759 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - RecorderController(props.build, Some(IDEPathHelper.recorderConfigFile)) 11:24:23.759 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - ^ 11:24:29.285 [main][ERROR][ZincCompiler.scala:108] i.g.c.ZincCompiler$ - three errors found

I’m assuming this is due to some changes in the versions, but am unsure as to how to fix this.

I managed to resolve the errors in the previous comment, but have now gotten the following issues:

[INFO] [INFO] --- gatling-maven-plugin:2.1.7:execute (default-cli) @ xxx --- java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50) at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33) Caused by: java.lang.NoSuchMethodError: scala.runtime.IntRef.create(I)Lscala/runtime/IntRef; at scopt.OptionParser.parse(options.scala:322) at scopt.OptionParser.parse(options.scala:314) at io.gatling.app.cli.ArgsParser.parseArguments(ArgsParser.scala:95) at io.gatling.app.Gatling$.fromArgs(Gatling.scala:57) at io.gatling.app.Gatling$.main(Gatling.scala:44) at io.gatling.app.Gatling.main(Gatling.scala) ... 6 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 22.557 s [INFO] Finished at: 2015-07-21T13:00:36-05:00 [INFO] Final Memory: 8M/114M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.1.7:execute (default-cli) on project xxx: Gatling failed. Process exited with an error: 255 (Exit value: 255) -> [Help 1] [ERROR]

Could you share your pom.xml, please ?

`

<?xml version="1.0" encoding="UTF-8"?>


4.0.0
xxx
xxx
1.0.0-SNAPSHOT

1.6 1.6 2.10.4 2.10 UTF-8

<gatling.version>2.1.7</gatling.version>
<gatling-highcharts.version>2.1.7</gatling-highcharts.version>

<scala-maven-plugin.version>3.1.6</scala-maven-plugin.version>

com.jsuereth scala-arm_${scala.binary.version} 1.3 org.scala-lang scala-library ${scala.version} org.scala-lang scala-reflect ${scala.version} org.scala-lang scala-compiler ${scala.version} org.scala-lang scala-swing ${scala.version} io.gatling.highcharts gatling-charts-highcharts ${gatling-highcharts.version} runtime io.gatling gatling-app ${gatling.version} io.gatling gatling-recorder ${gatling.version} io.gatling gatling-core ${gatling.version} io.gatling gatling-http ${gatling.version} org.scala-lang scala-library org.scala-lang scala-reflect org.scala-lang scala-compiler com.typesafe config 1.0.2 com.typesafe.play play-json_${scala.binary.version} 2.2.1 src/main/scala src/test/scala net.alchim31.maven scala-maven-plugin ${scala-maven-plugin.version} io.gatling gatling-maven-plugin ${gatling.version} net.alchim31.maven scala-maven-plugin compile testCompile -target:jvm-1.6 -deprecation -feature -unchecked -language:implicitConversions -language:postfixOps io.gatling gatling-maven-plugin excilys Excilys Repository http://repository.excilys.com/content/repositories/public never false typesafe-release Typesafe Release Repository http://repo.typesafe.com/typesafe/releases excilys Excilys Repository http://repository.excilys.com/content/repositories/public never false

`

Ah, I see what is the source of your problem : Gatling 2.1 uses Scala 2.11, but you’re using Scala 2.10.4 here, and mixing Scala versions really doesn’t end well :slight_smile:
Also, having Excilys repositories is not necessary anymore, as Gatling is published to Central now.
Last but not least : You’re setting a target for JDK6, but Gatling now requires JDK7.
Also, please consult the Migration guides.

Cheers,

Pierre

So that’s fixed, but I can’t find any info on the following issue: [WARNING] The POM for com.typesafe.play:play-json_2.11:jar:2.2.1 is missing, no dependency information available
I’ve come across it before and fixed it, but cannot remember how.

This basically means that play 2.2.1 is too old to have been compiled against Scala 2.11.
You’ll need to upgrade to a more recent version of play-json (try out 2.3.9, as the 2.4 series will up your JDK requirements to JDK8).

Awesome.

So this is the error I was getting awhile ago with another one of the versions I tried to upgrade to:

14:53:09.157 [WARN ] i.g.c.a.GatlingActorSystem$ - Gatling Actor system wasn't shut down as it wasn't started in the first place java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50) at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33) Caused by: java.lang.NoSuchMethodError: com.typesafe.config.Config.getDuration(Ljava/lang/String;Ljava/util/concurrent/TimeUnit;)J at akka.util.Helpers$ConfigOps$.akka$util$Helpers$ConfigOps$$getDuration$extension(Helpers.scala:126) at akka.util.Helpers$ConfigOps$.getMillisDuration$extension(Helpers.scala:121) at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:172) at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:505) at akka.actor.ActorSystem$.apply(ActorSystem.scala:142) at akka.actor.ActorSystem$.apply(ActorSystem.scala:109) at io.gatling.core.akka.GatlingActorSystem$.start(GatlingActorSystem.scala:28) at io.gatling.core.runner.Runner.run(Runner.scala:35) at io.gatling.app.Gatling$$anonfun$runSimulationIfNecessary$1.apply(Gatling.scala:138) at io.gatling.app.Gatling$$anonfun$runSimulationIfNecessary$1.apply(Gatling.scala:123) at scala.Option.getOrElse(Option.scala:121) at io.gatling.app.Gatling.runSimulationIfNecessary(Gatling.scala:123) at io.gatling.app.Gatling.start(Gatling.scala:73) at io.gatling.app.Gatling$.fromArgs(Gatling.scala:59) at io.gatling.app.Gatling$.main(Gatling.scala:44) at io.gatling.app.Gatling.main(Gatling.scala) ... 6 more [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 50.999 s [INFO] Finished at: 2015-07-21T14:53:09-05:00 [INFO] Final Memory: 12M/144M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:2.1.7:execute (default-cli)

Not entirely sure what the Gatling actor system is or how this error could be coming about?