ElParserException: Failed to parse

Hello! I’m new to Gatling and I am trying to get started. I created a simple test copying the example from the Gatling website like so:

`
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._

class HomeSimulation extends Simulation {

val httpConf = http // 4
.baseURL(“http://computer-database.gatling.io”) // 5
//.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8”) // 6
.doNotTrackHeader(“1”)
.acceptLanguageHeader(“en-US,en;q=0.5”)
.acceptEncodingHeader(“gzip, deflate”)
.userAgentHeader(“Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0”)

val scn = scenario(“BasicSimulation”) // 7
.exec(http(“request_1”) // 8
.get("/")) // 9
.pause(5) // 10

setUp( // 11
scn.inject(atOnceUsers(1)) // 12
).protocols(httpConf) // 13

}

`

When running the test from gradle I get an exception:

`
./gradlew gatlingRun

Task :gatlingRun FAILED
20:04:06.442 [GatlingSystem-akka.actor.default-dispatcher-2] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
Exception in thread “main” io.gatling.core.session.el.ElParserException: Failed to parse 1 with error ‘[B cannot be cast to [C’
at io.gatling.core.session.el.ElCompiler.parseEl(ElCompiler.scala:249)
at io.gatling.core.session.el.ElCompiler$.parse(ElCompiler.scala:171)
at io.gatling.core.session.el.ElCompiler$.compile(ElCompiler.scala:174)
at io.gatling.core.session.el.package$El$.el$extension(package.scala:26)
at io.gatling.core.ValidationImplicits.stringToExpression(ValidationImplicits.scala:48)
at io.gatling.core.ValidationImplicits.stringToExpression$(ValidationImplicits.scala:48)
at io.gatling.core.Predef$.stringToExpression(Predef.scala:22)
at loadtests.HomeSimulation.(HomeSimulation.scala:13)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.base/java.lang.Class.newInstance(Class.java:560)
at io.gatling.app.Runner.run0(Runner.scala:79)
at io.gatling.app.Runner.run(Runner.scala:64)
at io.gatling.app.Gatling$.start(Gatling.scala:63)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:gatlingRun’.

Some simulations failed : simu
`

Not sure what I’m missing but I copied the example from Gatling’s quick start.

Thanks a lot in advance.

From this very same page:

In order to run Gatling, you need to have a JDK installed. Gatling requires JDK8 (hence doesn’t support JDK9 atm).