Hi,
I’m trying to create a job in jenkins for my maven project. When I run the job, I have this error :
[INFO] <b>--- gatling-maven-plugin:1.4.5:execute (default) @ apisense-bench ---
</b>Exception in thread "main" java.lang.NoClassDefFoundError: "-Drvm_version=1/15/7 (stable)"
Caused by: java.lang.ClassNotFoundException: "-Drvm_version=1.15.7 (stable)"
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: "-Drvm_version=1.15.7 (stable)". Program will exit.
When I try locally with maven (mvn install) everything goes well.
I have the jenkins 1.506 with the gatling plugin 1.4.5.
Thanks for the help.
Christophe
Hi,
I’d need your config in order to investigate.
Until then, could you try and disable System properties propagation (set to false): https://github.com/excilys/gatling/wiki/Maven-plugin#wiki-advanced
Stéphane
Great, but still, I’d like to figure out what happens… 
You probably have a System property that messes with the forked command line, but I can’t guess what happens and the log is disabled in the version you have…
What is strange is that RVM is the Ruby Version Manager. Maybe an environment variable is captured by the maven plugin…
Or maybe there’s some Jruby somewhere?
I tried on the Inria Jenkins plateforme and in locally (fresh installation with only jenkins gatling plugin), and both gave me the same error. Strange.
I’m building a 1.4.6-SNAPSHOT that should be logging the generated command line. It should be available in ~30 minutes.
Do you think you could give it a try?
I actually have an issue with our Cloudbees CI and had to open a ticket there.
I’ll keep you updated.
Hi,
The CI is up again, so I was able to build a 1.4.6-SNAPSHOT that would log the generated command line and help diagnose your problem.
Could you give it a try, please?
http://repository-gatling.forge.cloudbees.com/snapshot/
You have to add this new plugin repository and enable snapshots for it.
Cheers,
Stéphane
with propagateSystemProperties = false → log1.txt
with propagateSystemProperties = true → log2.txt
log1.txt (10.4 KB)
How unlucky: the LAST system property being propagated is empty, so you end up with something like:
java -Drvm_gemstone_url= scala_maven_executions.MainWithArgsInFile com.excilys.ebi.gatling.app.Gatling
and java interprets “scala_maven_executions.MainWithArgsInFile” as the System property value instead of the main class and “com.excilys.ebi.gatling.app.Gatling” as the main class instead of an argument for MainWithArgsInFile.
Our fault for not protecting String values.
Will fix, thanks for your help!
Stéphane
FYI, I’ve pushed a fix and built a new snapshot.
Cheers,
Stéphane