Getting "Exception in thread "main" Compilation failed"

Hi All,

I am simply recording one small scenario and while executing the same I am getting following bellow error. Please let me know the solution for the same.

GATLING_HOME is set to "C:\sc1\GattlingSoftware\gatling-charts-highcharts-1.4.2"
10:29:30.427 [ERROR] c.e.e.g.a.ZincCompiler$ - IO error while decoding C:\sc1\GattlingSoftware\gatling-charts-highcharts-1.4.2\user-files\simulations\Test1.scala with UTF
Please try specifying another one using the -encoding option
10:29:30.433 [ERROR] c.e.e.g.a.ZincCompiler$ - one error found
Exception in thread “main” Compilation failed
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:76)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:35)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:29)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply$mcV$sp(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile$$anonfun$4$$anonfun$compileScala$1$1.apply(AggressiveCompile.scala:71)
at sbt.compiler.AggressiveCompile.sbt$compiler$AggressiveCompile$$timed(AggressiveCompile.scala:101)
at sbt.compiler.AggressiveCompile$$anonfun$4.compileScala$1(AggressiveCompile.scala:70)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:88)
at sbt.compiler.AggressiveCompile$$anonfun$4.apply(AggressiveCompile.scala:60)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:24)
at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:22)
at sbt.inc.Incremental$.cycle(Incremental.scala:40)
at sbt.inc.Incremental$.compile(Incremental.scala:25)
at sbt.inc.IncrementalCompile$.apply(Compile.scala:20)
at sbt.compiler.AggressiveCompile.compile2(AggressiveCompile.scala:96)
at sbt.compiler.AggressiveCompile.compile1(AggressiveCompile.scala:44)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:158)
at com.typesafe.zinc.Compiler.compile(Compiler.scala:142)
at com.excilys.ebi.gatling.app.ZincCompiler$.apply(ZincCompiler.scala:104)
at com.excilys.ebi.gatling.app.SimulationClassLoader$.fromSourcesDirectory(SimulationClassLoader.scala:34)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$11$$anonfun$13.apply(Gatling.scala:90)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$11$$anonfun$13.apply(Gatling.scala:90)
at scala.Option.getOrElse(Option.scala:108)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$11.apply(Gatling.scala:90)
at com.excilys.ebi.gatling.app.Gatling$$anonfun$11.apply(Gatling.scala:87)
at scala.Option.getOrElse(Option.scala:108)
at com.excilys.ebi.gatling.app.Gatling.start(Gatling.scala:87)
at com.excilys.ebi.gatling.app.Gatling$.fromMap(Gatling.scala:54)
at com.excilys.ebi.gatling.app.Gatling$.runGatling(Gatling.scala:73)
at com.excilys.ebi.gatling.app.Gatling$.main(Gatling.scala:49)
at com.excilys.ebi.gatling.app.Gatling.main(Gatling.scala)
Press any key to continue . . .

Does the issue also arise with Gatling 1.5.2?

Yes,

However I have solved the same using opening the file in noptepad++ and encode with UTF-8 BOM

Regards,
Arvind

Did your initial recording use an encoding different from UTF-8? If you, you have to set up the proper one in gatling.conf.