Error: Could not find or load main class io.gatling.recorder.GatlingRecorder

2,935 views
Skip to first unread message

Xyng Fei Lim

unread,
Sep 29, 2016, 12:07:31 AM9/29/16
to Gatling User Group
Following the documentation, http://gatling.io/docs/2.2.2/quickstart.html JDK8 has installed on my WIN2012 R2 server machine.
However, i still cannot launch the recorder successfully. 

Even gatling.bat also encounter the following error. 

GATLING_HOME is set to "D:\iDA_Proj\Tools\gatling-2.2.3\"
JAVA = ""C:\Program Files\Java\jdk1.8.0_102\bin\java.exe""
"C:\Program Files\Java\jdk1.8.0_102\bin\java.exe"  -server -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=
30 -XX:G1HeapRegionSize=16m -XX:InitiatingHeapOccupancyPercent=75 -XX:+ParallelRefProcEnabled -XX:+P
erfDisableSharedMem -XX:+AggressiveOpts -XX:+OptimizeStringConcat -XX:+HeapDumpOnOutOfMemoryError -D
java.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false -cp "D:\iDA_Proj\Tools\gatling-2.
2.3\"\lib\*;"D:\iDA_Proj\Tools\gatling-2.2.3\"\user-files;"D:\iDA_Proj\Tools\gatling-2.2.3\"\conf; i
o.gatling.app.Gatling
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -server       to select the "server" VM
                  The default VM is server.

...
...


Any suggestion?

Xyng Fei Lim

unread,
Sep 29, 2016, 12:26:15 AM9/29/16
to Gatling User Group
I really cannot believe that after move the gatling home folder from D:\iDA_Proj\Tools\gatling-2.2.2 to D:\Tools\gatling-2.2.2, issue has been resolved automatically. So weird!!

Stéphane LANDELLE

unread,
Sep 29, 2016, 4:17:14 AM9/29/16
to gat...@googlegroups.com
This happens because Windows has a pretty short limit on commands length.
We currently launch Gatling in a straightforward fashion, like "java -classpath <LIST_ABSOLUTE_PATHS_OF_ALL_JARS_IN_LIB_DIR> Gatling". The deeper the Gatling path, the longer the classpath.
At some point, we might want to work around this Windows limitation and go with a more complex strategy, like having a booter that would create a classloader in a different fashion, but that will only happen in Gatling 3.
AFAIK, we don't have the problem with OSX/Linux.

Stéphane Landelle
GatlingCorp CEO


--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sabak Global

unread,
Jul 24, 2017, 7:41:28 AM7/24/17
to Gatling User Group
Hi, Please can you help with a solution to this similar issue.

 I am runing Gatling on window enterprise 7 cmd and I am getting below error message. Can someone help me please. this is my first time using Gatling.

This is the error: Error: Could not find or load main class io.gatling.app.Gatling

I entered the following script in the command line: C:\Users\akinrins\Desktop\Gatling\bin>gatling -s CEHSimulation

To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.

Stéphane LANDELLE

unread,
Jul 24, 2017, 9:03:50 AM7/24/17
to gat...@googlegroups.com
Try reducing path length and moving Gatling install closer to filesystem root.

Stéphane Landelle
GatlingCorp CEO


To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.

Jack Sun

unread,
Feb 27, 2019, 6:32:27 PM2/27/19
to Gatling User Group
I am getting same issue - the only change is that I power off my MAC, and now 
just run gatling.sh --version . will get "Error: Could not find or load main class io.gatling.app.Gatling"
Jack
Reply all
Reply to author
Forward
0 new messages