I recently run my gatling simulation scenario using maven following this tutorial,
It runs okay week ago, until recently I try to re run the scenario again then I got error
[main][ERROR][Gatling.scala:83] i.g.a.Gatling$ - Run crashed java.util.NoSuchElementException: null
.
I run the scenatio with this command
mvn gatling:test -Dgatling.simulationClass=myscenario
I thought this caused by some corrupt repository? Because I see it points to gatling dependency.
I tried to reinstall the dependency with:
mvn dependency:purge-local-repository
- doesn't solve the issue
mvn clean install -U
- doesn't solve the issue
rm -rf ~/.m2/repository
- doesn't solve the issue
Here are the logs:
[INFO] Scanning for projects...
[INFO]
[INFO] ----------< collection:collection >-----------
[INFO] Building collection 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- gatling-maven-plugin:3.1.0:test (default-cli) @ collection ---
16:34:00.585 [main][ERROR][Gatling.scala:83] i.g.a.Gatling$ - Run crashed
java.util.NoSuchElementException: null
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
... 16 common frames omitted
Wrapped by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:65)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:65)
at io.gatling.app.Runner.run(Runner.scala:52)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
Caused by: java.util.NoSuchElementException
at scala.collection.immutable.BitmapIndexedMapNode.apply(HashMap.scala:635)
at scala.collection.immutable.HashMap.apply(HashMap.scala:132)
at simulations.PoolCollection.<init>(PoolCollection.scala:21)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.377 s
[INFO] Finished at: 2021-01-28T16:34:00+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:3.1.0:test (default-cli) on project collection: Gatling failed.: Process exited with an error: 255 (Exit value: 255) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
question from:
https://stackoverflow.com/questions/65934899/cant-run-gatling-simulation-error-nosuchelementexception-gatling-scala83 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…