This is in Gatling 2.2.2
I have a simple CSV I’m trying to use in the user-files/data directory, in the format of:
loginEmail,loginPassword
“test+stress0@example.com”,“password”
“test+stress1@example.com”,“password2”
… (etc)
Trying to create the feeder gives an error:
Code:
package example
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.HeaderNames._
import io.gatling.http.check.HttpCheck
import scala.concurrent.duration._
import util.Random
import io.gatling.jsonpath.JsonPath
object Login {
val loginFeeder = csv(“customer_accounts.csv”)
…
Removing / commenting the csv line (and anything referencing it) will prevent the error from occurring, though I then have to hard code the values it’s meant to replace for the script to actually work. If I put the file somewhere else or otherwise make the path to the file wrong, I get a corresponding error about the CSV file not being found, so it at least gets as far as trying to read the file. Nothing in the CSV file is outside the range of [0-9a-zA-Z] except for the ‘@’ in the email field, and the commas and quotation marks formatting the CSV file itself.
This is the error I get:
Exception in thread “main” java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.ObjectMapper.readerFor(Ljava/lang/Class;)Lcom/fasterxml/jackson/databind/ObjectReader;
at io.gatling.core.feeder.SeparatedValuesParser$.stream(SeparatedValuesParser.scala:46)
at io.gatling.core.feeder.SeparatedValuesParser$.io$gatling$core$feeder$SeparatedValuesParser$$$anonfun$1(SeparatedValuesParser.scala:38)
at io.gatling.core.feeder.SeparatedValuesParser$lambda$$parse$1.apply(SeparatedValuesParser.scala:37)
at io.gatling.core.feeder.SeparatedValuesParser$lambda$$parse$1.apply(SeparatedValuesParser.scala:37)
at io.gatling.commons.util.Io$.withCloseable(Io.scala:146)
at io.gatling.core.feeder.SeparatedValuesParser$.parse(SeparatedValuesParser.scala:37)
at io.gatling.core.feeder.FeederSupport$class.io$gatling$core$feeder$FeederSupport$class$$$anonfun$1(FeederSupport.scala:44)
at io.gatling.core.feeder.FeederSupport$class$lambda$$separatedValues$1.apply(FeederSupport.scala:44)
at io.gatling.core.feeder.FeederSupport$class$lambda$$separatedValues$1.apply(FeederSupport.scala:44)
at io.gatling.core.feeder.FeederSupport$class.feederBuilder(FeederSupport.scala:52)
at io.gatling.core.Predef$.feederBuilder(Predef.scala:22)
at io.gatling.core.feeder.FeederSupport$class.separatedValues(FeederSupport.scala:44)
at io.gatling.core.Predef$.separatedValues(Predef.scala:22)
at io.gatling.core.feeder.FeederSupport$class.separatedValues(FeederSupport.scala:41)
at io.gatling.core.Predef$.separatedValues(Predef.scala:22)
at io.gatling.core.feeder.FeederSupport$class.csv(FeederSupport.scala:34)
at io.gatling.core.Predef$.csv(Predef.scala:22)
at magento.Login$.(Login.scala:19)
at magento.Login$.(Login.scala)
at magento.MagentoSimulation.(MagentoSimulation.scala:51)
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 io.gatling.app.Gatling$.io$gatling$app$Gatling$$$anonfun$1(Gatling.scala:41)
at io.gatling.app.Gatling$lambda$1.apply(Gatling.scala:41)
at io.gatling.app.Gatling$lambda$1.apply(Gatling.scala:41)
at io.gatling.app.Gatling.run(Gatling.scala:92)
at io.gatling.app.Gatling.runIfNecessary(Gatling.scala:75)
at io.gatling.app.Gatling.start(Gatling.scala:65)
at io.gatling.app.Gatling$.start(Gatling.scala:57)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
at io.gatling.app.Gatling$.main(Gatling.scala:43)
at io.gatling.app.Gatling.main(Gatling.scala)
Any ideas on why it’s failing / how to fix it ?