excilys/gatling — Issue #381: MalformedInputException
Author: pyricau
Created: 2012-01-29 22:47:47+00:00
State: open

Noob Mode : ON

I'm trying to run a simulation created with the recorder. I get the following error when starting it (default simulations seems to work fine) :

```
~/Downloads/gatling-charts-highcharts-1.0.3/bin/gatling.sh
GATLING_HOME not set, using default location (/Users/pyricau/Downloads/gatling-charts-highcharts-1.0.3)
-----------
Gatling cli
-----------

Which simulation do you want to execute ?

- 20120129233558_scenario
[0] default_txt

- advanced-script-example
[1] default

- basic-script-example
[2] default

Simulation #:
0
Simulation started...
Exception in thread "main" java.nio.charset.MalformedInputException: Input length = 1
at java.nio.charset.CoderResult.throwException(CoderResult.java:260)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:319)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.read(BufferedReader.java:157)
at scala.io.BufferedSource$$anonfun$iter$1$$anonfun$apply$mcI$sp$1.apply$mcI$sp(BufferedSource.scala:38)
at scala.io.Codec.wrap(Codec.scala:64)
at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38)
at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38)
at scala.collection.Iterator$$anon$14.next(Iterator.scala:148)
at scala.collection.Iterator$$anon$25.hasNext(Iterator.scala:463)
at scala.collection.Iterator$$anon$19.hasNext(Iterator.scala:334)
at scala.io.Source.hasNext(Source.scala:238)
at scala.collection.Iterator$class.foreach(Iterator.scala:660)
at scala.io.Source.foreach(Source.scala:181)
at scala.collection.TraversableOnce$class.addString(TraversableOnce.scala:285)
at scala.io.Source.addString(Source.scala:181)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:263)
at scala.io.Source.mkString(Source.scala:181)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:265)
at scala.io.Source.mkString(Source.scala:181)
at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:267)
at scala.io.Source.mkString(Source.scala:181)
at com.excilys.ebi.gatling.app.compiler.TextScenarioCompiler.collectSourceFiles(TextScenarioCompiler.scala:53)
at com.excilys.ebi.gatling.app.compiler.ScalaScenarioCompiler.compile(ScalaScenarioCompiler.scala:60)
at com.excilys.ebi.gatling.app.compiler.ScalaScenarioCompiler.run(ScalaScenarioCompiler.scala:47)
at com.excilys.ebi.gatling.app.Gatling$.run(Gatling.scala:193)
at com.excilys.ebi.gatling.app.Gatling$.displayMenuAndRun(Gatling.scala:140)
at com.excilys.ebi.gatling.app.Gatling$.runGatling(Gatling.scala:81)
at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:63)
at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
```

My scenario :

```
val urlBase = "http://voxe.org"

val httpConf = httpConfig.baseURL(urlBase)
val url_2 = "http://voxe.s3.amazonaws.com/assets/web-68d57c180800dffccacb5d9c3b5dec49.css"
val url_3 = "http://voxe.s3.amazonaws.com/assets/web/favicon-44df5c5c9316f8457247989a5aece98f.ico"
val url_4 = "http://voxe.s3.amazonaws.com/assets/icons/32-db7107da194269782554758a3499158f.png"
val url_5 = "http://voxe.s3.amazonaws.com/assets/web-2598fbd07bb95e7fde84f4225ec1910c.js"
val url_6 = "http://www.google-analytics.com/ga.js"
val url_7 = "http://www.google-analytics.com/__utm.gif"
val url_9 = "http://voxe.s3.amazonaws.com/candidates/francois-bayrou.jpg"
val url_10 = "http://voxe.s3.amazonaws.com/candidates/marie-george-buffet.jpg"
val url_11 = "http://voxe.s3.amazonaws.com/candidates/jean-marie-le-pen.jpg"
val url_12 = "http://voxe.s3.amazonaws.com/candidates/jose-bove.jpg"
val url_13 = "http://voxe.s3.amazonaws.com/candidates/olivier-besancenot.jpg"
val url_14 = "http://voxe.s3.amazonaws.com/candidates/nicolas-sarkozy.jpg"
val url_15 = "http://voxe.s3.amazonaws.com/candidates/arlette-laguiller.jpg"
val url_16 = "http://voxe.s3.amazonaws.com/candidates/segolene-royal.jpg"
val url_17 = "http://voxe.s3.amazonaws.com/candidates/frederic-nihous.jpg"
val url_18 = "http://voxe.s3.amazonaws.com/candidates/Nathalie-Arthaud.jpg"
val url_19 = "http://voxe.s3.amazonaws.com/candidates/Christine-Boutin.jpg"
val url_20 = "http://voxe.s3.amazonaws.com/candidates/dominique-voynet.jpg"
val url_21 = "http://voxe.s3.amazonaws.com/candidates/jean-pierre-chevenement.jpg"
val url_22 = "http://voxe.s3.amazonaws.com/candidates/Parti-EELV.jpg"
val url_23 = "http://voxe.s3.amazonaws.com/candidates/gerard-schivardi.jpg"
val url_24 = "http://voxe.s3.amazonaws.com/candidates/philippe-de-villiers.jpg"
val url_25 = "http://voxe.s3.amazonaws.com/candidates/François-Hollande.jpg"
val url_26 = "http://voxe.s3.amazonaws.com/candidates/eva-joly.jpg"
val url_27 = "http://voxe.s3.amazonaws.com/candidates/nicolas-dupont-aignan.jpg"
val url_28 = "http://voxe.s3.amazonaws.com/candidates/Jean-Luc-Mélenchon.jpg"
val url_29 = "http://voxe.s3.amazonaws.com/candidates/Philippe-Poutou.jpg"
val url_30 = "http://voxe.s3.amazonaws.com/candidates/Dominique-de Villepin.jpg"
val url_31 = "http://voxe.s3.amazonaws.com/candidates/Parti-UMP.jpg"
val url_32 = "http://voxe.s3.amazonaws.com/candidates/marine-le-pen.jpg"
val url_33 = "http://voxe.s3.amazonaws.com/tags/culture-et-medias_32.png"
val url_34 = "http://voxe.s3.amazonaws.com/tags/politique-etrangere_32.png"
val url_35 = "http://voxe.s3.amazonaws.com/tags/economie-et-emploi_32.png"
val url_36 = "http://voxe.s3.amazonaws.com/tags/justice-securite-et-defense_32.png"
val url_37 = "http://voxe.s3.amazonaws.com/tags/environnement-et-agriculture_32.png"
val url_38 = "http://voxe.s3.amazonaws.com/tags/les-institutions_32.png"
val url_39 = "http://voxe.s3.amazonaws.com/tags/solidarite-sante-et-logement_32.png"
val url_40 = "http://voxe.s3.amazonaws.com/tags/territoires-et-services-publics_32.png"
val url_41 = "http://voxe.s3.amazonaws.com/tags/europe_32.png"
val url_42 = "http://voxe.s3.amazonaws.com/tags/le-pacte-ecologique_32.png"
val url_43 = "http://voxe.s3.amazonaws.com/tags/societe-immigration-et-famille_32.png"
val url_44 = "http://voxe.s3.amazonaws.com/tags/education-et-recherche_32.png"
val url_46 = "http://voxe.s3.amazonaws.com/tags/environnement-et-agriculture_64.png"
val url_47 = "http://voxe.s3.amazonaws.com/assets/web/ajax-loader-c040c0cd9239e33cec1d07bfc22d61f6.gif"

val headers_1 = Map(
"Accept" -> """text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_2 = Map(
"Accept" -> """text/css,*/*;q=0.1""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.s3.amazonaws.com""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_3 = Map(
"Accept" -> """image/png,image/*;q=0.8,*/*;q=0.5""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.s3.amazonaws.com""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_4 = headers_3 ++ Map(
"Referer" -> """http://voxe.org/"""
)

val headers_5 = Map(
"Accept" -> """*/*""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.s3.amazonaws.com""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_6 = Map(
"Accept" -> """*/*""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Cache-Control" -> """max-age=0""",
"Host" -> """www.google-analytics.com""",
"If-Modified-Since" -> """Tue, 08 Nov 2011 01:02:28 GMT""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_7 = Map(
"Accept" -> """image/png,image/*;q=0.8,*/*;q=0.5""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """www.google-analytics.com""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"""
)

val headers_8 = Map(
"Accept" -> """application/json, text/javascript, */*; q=0.01""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"Referer" -> """http://voxe.org/""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1""",
"X-Requested-With" -> """XMLHttpRequest"""
)

val headers_33 = headers_3 ++ Map(
"Referer" -> """http://voxe.org/france-presidentielle-2007"""
)

val headers_45 = Map(
"Accept" -> """application/json, text/javascript, */*; q=0.01""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"Referer" -> """http://voxe.org/france-presidentielle-2007""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1""",
"X-Requested-With" -> """XMLHttpRequest"""
)

val headers_46 = headers_3 ++ Map(
"Referer" -> """http://voxe.org/france-presidentielle-2007/francois-bayrou,olivier-besancenot/environnement-et-agriculture"""
)

val headers_48 = Map(
"Accept" -> """application/json, text/javascript, */*; q=0.01""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Accept-Encoding" -> """gzip, deflate""",
"Accept-Language" -> """fr,en;q=0.7,chrome://global/locale/intl.properties;q=0.3""",
"Host" -> """voxe.org""",
"Referer" -> """http://voxe.org/france-presidentielle-2007/francois-bayrou,olivier-besancenot/environnement-et-agriculture""",
"User-Agent" -> """Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:9.0.1) Gecko/20100101 Firefox/9.0.1""",
"X-Requested-With" -> """XMLHttpRequest"""
)

val scn = scenario("Scenario name")
.exec(
http("request_1")
.get("/")
.headers(headers_1)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_2")
.get(url_2)
.headers(headers_2)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_3")
.get(url_3)
.headers(headers_3)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_4")
.get(url_4)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_5")
.get(url_5)
.headers(headers_5)
)
.pause(300, 400, MILLISECONDS)
.exec(
http("request_6")
.get(url_6)
.headers(headers_6)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_7")
.get(url_7)
.queryParam("utmwv", "5.2.3")
.queryParam("utms", "1")
.queryParam("utmn", "1347825802")
.queryParam("utmhn", "voxe.org")
.queryParam("utmcs", "UTF-8")
.queryParam("utmsr", "1920x1080")
.queryParam("utmvp", "1905x972")
.queryParam("utmsc", "24-bit")
.queryParam("utmul", "fr")
.queryParam("utmje", "1")
.queryParam("utmfl", "10.2 r152")
.queryParam("utmdt", "Voxe")
.queryParam("utmhid", "1150427980")
.queryParam("utmr", "-")
.queryParam("utmp", "/")
.queryParam("utmac", "UA-28225427-1")
.queryParam("utmcc", "__utma=42351010.402921598.1327876564.1327876564.1327876564.1;+__utmz=42351010.1327876564.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);")
.queryParam("utmu", "q~")
.headers(headers_7)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_8")
.get("/api/v1/elections/search")
.headers(headers_8)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_9")
.get(url_9)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_10")
.get(url_10)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_11")
.get(url_11)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_12")
.get(url_12)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_13")
.get(url_13)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_14")
.get(url_14)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_15")
.get(url_15)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_16")
.get(url_16)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_17")
.get(url_17)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_18")
.get(url_18)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_19")
.get(url_19)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_20")
.get(url_20)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_21")
.get(url_21)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_22")
.get(url_22)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_23")
.get(url_23)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_24")
.get(url_24)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_25")
.get(url_25)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_26")
.get(url_26)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_27")
.get(url_27)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_28")
.get(url_28)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_29")
.get(url_29)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_30")
.get(url_30)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_31")
.get(url_31)
.headers(headers_4)
.check(status.eq(403))
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_32")
.get(url_32)
.headers(headers_4)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_33")
.get(url_33)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_34")
.get(url_34)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_35")
.get(url_35)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_36")
.get(url_36)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_37")
.get(url_37)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_38")
.get(url_38)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_39")
.get(url_39)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_40")
.get(url_40)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_41")
.get(url_41)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_42")
.get(url_42)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_43")
.get(url_43)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_44")
.get(url_44)
.headers(headers_33)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_45")
.get("/api/v1/elections/4ef479f8bc60fb0004000001")
.queryParam("tags", "all")
.headers(headers_45)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_46")
.get(url_46)
.headers(headers_46)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_47")
.get(url_47)
.headers(headers_46)
)
.pause(0, 100, MILLISECONDS)
.exec(
http("request_48")
.get("/api/v1/propositions/search")
.queryParam("electionIds", "4ef479f8bc60fb0004000001")
.queryParam("tagIds", "4ef479fabc60fb00040000ec")
.queryParam("candidacyIds", "4ef479fdbc60fb000400026f,4ef479fdbc60fb0004000273")
.headers(headers_48)
)

val scnConf = scn.configure users 10 ramp 10 protocolConfig httpConf
runSimulation(scnConf)
```