Getting ElParserException all over the place in my Gatling code.

I am getting the following error in my Gatling code. I am not sure what triggered this. But, unless I wrap my strings in Succes () so that it succeeds as an EL expression -my Gatling code will not run at all.

The exception I see is

Exception in thread “main” io.gatling.core.session.el.ElParserException: Failed to parse “Name” with error '[B cannot be cast to [C

in this example snippet

val scn = scenario("loadtest").during(duration) {
        .get(session => session("url").as[String])

This is happening all over the place.  For example I had to write this .. !!

val httpConf = http
  .acceptHeader(s => Success("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"))
  .acceptEncodingHeader(s => Success("gzip, deflate"))
  .acceptLanguageHeader(s => Success("en-US,en;q=0.5"))
  .userAgentHeader(s => Success("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0"))

I had to wrap all names/ strings with Success () or else I will see ELParserException for each of the lines above.   I have written such code earlier and there were no such problems earlier.

What can trigger this ?



Ok. I concluded that this was the side effect of trying to convert the whole Gatling project to a fat-jar. My assumption at this point is that there is a class/ package clash that is not resolved correctly by the maven-shade plugin and the resulting class bundle is confusing the Gatling DSL causing this bizarre error. I was able to confirm this by recreating the project from scratch and the problem goes away