Failed to Creating report

Hi,

I am getting below error in while running gatling test. Test finishes and fails when report is being generated.

Simulation finished
Generating reports...
Parsing log file(s)...
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at io.gatling.core.result.reader.DataReader$.newInstance(DataReader.scala:26)
	at io.gatling.app.Gatling.dataReader$lzycompute$1(Gatling.scala:239)
	at io.gatling.app.Gatling.io$gatling$app$Gatling$$dataReader$1(Gatling.scala:239)
	at io.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:246)
	at io.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:246)
	at io.gatling.app.Gatling.generateReports$1(Gatling.scala:174)
	at io.gatling.app.Gatling.start(Gatling.scala:246)
	at io.gatling.app.Gatling$.fromMap(Gatling.scala:54)
	at io.gatling.app.Gatling$.runGatling(Gatling.scala:79)
	at io.gatling.app.Gatling$.runGatling(Gatling.scala:58)
	at io.gatling.app.Gatling$.main(Gatling.scala:50)
	at io.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.lang.IllegalArgumentException: requirement failed: simulation directory '/var/lib/jenkins/jobs/SIC-API Post Load Test/workspace/results/APIPost-1409004716082' doesn't exist
	at scala.Predef$.require(Predef.scala:233)
	at io.gatling.core.config.GatlingFiles$.simulationLogDirectory(GatlingFiles.scala:52)
	at io.gatling.charts.result.reader.FileDataReader.<init>(FileDataReader.scala:49)
	... 16 more
:APIPostLoadTest FAILED
:APIPostLoadTest (Thread[main,5,main]) completed. Took 5 mins 15.044 secs.


Please help me with this error.

I’d say your gatling-highcharts jar version is not aligned with your gatling-chars jar one.

I am using below dependencies in Gradle

dependencies {
// Gatling dependencies
compile ‘io.gatling:gatling-app:2.0.0-RC2’
compile “io.gatling.highcharts:gatling-charts-highcharts:2.0.0-RC2”

}

Sorry, I’d didn’t properly read the stacktrace.

You mustn’t have spaces in the path (not sure why, I haven’t investigated yet), so /var/lib/jenkins/jobs/SIC-API Post Load Test/workspace/results/APIPost-1409004716082 is not good.
It’s one of the first warnings in the doc: http://gatling.io/docs/2.0.0-RC2/quickstart.html#installing
and it also holds when running from Jenkins.

Please rename your job.

Stephane,

Thanks for you quick reply :slight_smile:

I renamed the job, but it is giving same error.

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at io.gatling.core.result.reader.DataReader$.newInstance(DataReader.scala:26)
	at io.gatling.app.Gatling.dataReader$lzycompute$1(Gatling.scala:239)
	at io.gatling.app.Gatling.io$gatling$app$Gatling$$dataReader$1(Gatling.scala:239)
	at io.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:246)
	at io.gatling.app.Gatling$$anonfun$start$1.apply(Gatling.scala:246)
	at io.gatling.app.Gatling.generateReports$1(Gatling.scala:174)
	at io.gatling.app.Gatling.start(Gatling.scala:246)
	at io.gatling.app.Gatling$.fromMap(Gatling.scala:54)
	at io.gatling.app.Gatling$.runGatling(Gatling.scala:79)
	at io.gatling.app.Gatling$.runGatling(Gatling.scala:58)
	at io.gatling.app.Gatling$.main(Gatling.scala:50)
	at io.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.lang.IllegalArgumentException: requirement failed: simulation directory '/var/lib/jenkins/jobs/SICActivityPostLoadTest/workspace/results/createactivity-1409008444056' doesn't exist
	at scala.Predef$.require(Predef.scala:233)
	at io.gatling.core.config.GatlingFiles$.simulationLogDirectory(GatlingFiles.scala:52)
	at io.gatling.charts.result.reader.FileDataReader.<init>(FileDataReader.scala:49)
	... 16 more
:ActivityPostLoadTest FAILED
:ActivityPostLoadTest (Thread[main,5,main]) completed. Took 38.589 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ActivityPostLoadTest'.
> Process 'command '/usr/java/jdk1.7.0_51/bin/java'' finished with non-zero exit value 1

The issue seem to occur especially when i use Throttle statement in scenario setup

setUp(scn.inject(rampUsers(5).over(5 seconds)))
.throttle( reachRps(5) in (120 seconds), holdFor(500 seconds))
.protocols(httpConf)

when i use constant Users per sec , i dont see above error. Any reason you can think about?

Could you locate the “createactivity-1409008444056” folder somewhere else on your file System?

For the benefit of others who run into the same issue make sure you have file as a data writer in gatling.conf. I ran into the same issue and spent a good hour trying to figure this out

gatling {
  data {
    writers = "console, file"