Newbie question: .body(file) -> Not found

900 views
Skip to first unread message

Håkon Sønderland

unread,
Apr 15, 2014, 5:13:31 AM4/15/14
to gat...@googlegroups.com
I've recorded a scenario with the recorder.

I get something like this:

class SimulationAPS1 extends Simulation {

val httpProtocol = http
.proxy("localhost",9090).httpsPort(443)

       val headers_13 = Map( <not included here >)


val scn = scenario("Scenario Name")
.exec(http("request_13")
.put("""/aps/corp/ajourhold/person/updatelist""")
.headers(headers_13)
.body(RawFileBody("RecordedSimulationTest1_request_13.txt"))
.check(status.is(500)))

The file "RecordedSimulationTest1_request_13.txt" exists in the "src/test/resources/request-bodies" directory of the project.

Why am I getting:

10:40:11.104 [ERROR] i.g.h.a.HttpRequestAction - file RecordedSimulationTest1_request_13.txt doesn't exist

I get this for all similar requests as well.  Any ideas?

Thanks,
Håkon

Håkon Sønderland

unread,
Apr 15, 2014, 5:16:18 AM4/15/14
to gat...@googlegroups.com
It would be prudent of me to include versions :  gatling 2.0.0-M3a, Scala 2.10.2, Java JDK 1.6.0_45

Håkon

Stéphane Landelle

unread,
Apr 15, 2014, 5:22:35 AM4/15/14
to gat...@googlegroups.com
Hi Hakon,

Do you think you could give snapshot a try?

2M3a is quite old and we're about to enter Gatling 2 release candidate phase.

Stéphane


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Håkon Sønderland

unread,
Apr 15, 2014, 6:32:20 AM4/15/14
to gat...@googlegroups.com
Thanks,

After updating I now get the following warnings:
[WARNING]  Expected all dependencies to require Scala version: 2.10.2
[WARNING]  io.gatling.highcharts:gatling-charts-highcharts:2.0.0-SNAPSHOT requires scala version: 2.10.2
[WARNING]  io.gatling:gatling-charts:2.0.0-SNAPSHOT requires scala version: 2.10.2
[WARNING]  io.gatling:gatling-app:2.0.0-SNAPSHOT requires scala version: 2.10.2
[WARNING]  io.gatling:gatling-core:2.0.0-SNAPSHOT requires scala version: 2.10.4
[WARNING] Multiple versions of scala libraries detected!

Should I be concerned?

Will try out the new recorder and report back.

Håkon

Håkon Sønderland

unread,
Apr 15, 2014, 6:50:46 AM4/15/14
to gat...@googlegroups.com
Hi again,

The recorder seem to be working fin, but when I try to run the Engine (from within Eclipse) I get this:
Exception in thread "main" java.lang.NoClassDefFoundError: scala/collection/Seq
at io.gatling.app.ZincCompiler.main(ZincCompiler.scala)
Caused by: java.lang.ClassNotFoundException: scala.collection.Seq
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 1 more
Compilation failed

This is with Eclipse Kepler 4.3.

Any suggestions?

Håkon

kl. 11:13:31 UTC+2 tirsdag 15. april 2014 skrev Håkon Sønderland følgende:

Stéphane Landelle

unread,
Apr 15, 2014, 8:48:40 AM4/15/14
to gat...@googlegroups.com
Weird non sense.


Which version of Scala IDE do you use? Are you sure you have a version that's for Scala 2.10?



Håkon Sønderland

unread,
Apr 22, 2014, 4:40:11 AM4/22/14
to gat...@googlegroups.com
I had to manually update the Engine.scala file from the 2.0.0-SNAPSHOT files to make it work.

Thank you for your help.

Håkon
Reply all
Reply to author
Forward
0 new messages