File is not a normal file

Iam trying to upload a file using Gatling but I don"t want to use the request stored in a file but the upload(file: File, mimeType: String, charset: String).
I get an error : File is not a normal file.
at com.ning.http.multipart.FilePartSource.( ~[async-http-client-1.7.5.jar:na]
at com.ning.http.multipart.FilePart.( ~[async-http-client-1.7.5.jar:na]
at com.ning.http.util.AsyncHttpProviderUtils.createMultipartRequestEntity( ~[async-http-client-1.7.5.jar:na]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.construct( ~[async-http-client-1.7.5.jar:na]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.buildRequest( ~[async-http-client-1.7.5.jar:na]
at com.ning.http.client.providers.netty.NettyConnectListener$ ~[async-http-client-1.7.5.jar:na]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect( ~[async-http-client-1.7.5.jar:na]
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute( ~[async-http-client-1.7.5.jar:na]
at com.ning.http.client.AsyncHttpClient.executeRequest( ~[async-http-client-1.7.5.jar:na]
at com.excilys.ebi.gatling.http.action.HttpRequestAction.execute(HttpRequestAction.scala:112) ~[gatling-http-1.2.3.jar:na]

I put the file in the user-files/request-bodies/MyFile as per the documentation.
With the error I just can’t think of what I have done wrong.


It throws this exception when the path is pointing to anything else than a file : a folder, a symlink etc.

How are you using it?


I don’t provide a path, using only the file name as it is in $GATLING_HOME/user-files/request-bodies/
It is a ‘pure’ docx file. I wanted to be able to run the load from different computers thus I couldn’t provide an absolute path.


Very strange.
Nicolas a reimplemented our CookieStore, now it’s way cleaner, and I’ve added some logs that would help us understand what happens.
Could you try this snapshot, please?



2012/6/25 Emmanuel Hugonnet <>

Not working :
Exception in thread “main” java.lang.IllegalArgumentException: Uploaded file /home/ehugonnet/programs/gatling-charts-highcharts-1.2.4-SNAPSHOT/user-files/request-bodies/application/vnd.openxmlformats-officedocument.wordprocessingml.document does not exist
at com.excilys.ebi.gatling.http.request.builder.UploadedFile$.apply(UploadedFile.scala:31)
at com.excilys.ebi.gatling.http.request.builder.AbstractHttpRequestWithBodyAndParamsBuilder.upload(AbstractHttpRequestWithBodyAndParamsBuilder.scala:110)
at com.silverpeas.customers.inra.SimulationCreationPublication.apply(SimulationCreationPublication.scala:700)
at com.silverpeas.customers.inra.SimulationCreationPublication.apply(SimulationCreationPublication.scala:11)

Offending code :

OK, so now it’s very clear! 328.png

The signature of the upload method is actually:
upload(httpParameterName, fileName, mimeType, charset)

with mimeType defaulting to application/octet-stream and charset defaulting to the one configured in gatling.conf

This was an old pull request where the httpParameterName could not be set and was automatically configured with the fileName, and we forgot to update the doc.

The doc is correct now:

Please let us know if it works now.


2012/6/25 Emmanuel Hugonnet <>

Seems to be wroking now but I’m getting out of memory errors in the permgen.
No time to investigate more before end of the week.
I will keep you informed.

Permgen?! This is a first.

Would be interested in how your scenario works. Feel free to PM me if you think I can help but don’t want to post your scenario on the mailing list.


2012/6/27 Emmanuel Hugonnet <>

-XX:+CMSParallelRemarkEnabled option should probably be added in script. Will be in 1.2.4.


2012/6/27 Stéphane Landelle <>

I meant -XX:+CMSClassUnloadingEnabled, sorry!

2012/6/27 Stéphane Landelle <>