Jenkins+plugin maven : NoClassDefFoundError


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 Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
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.



I’d need your config in order to investigate.
Until then, could you try and disable System properties propagation (set to false):


with :


everything works \o/

Thanks Stéphane :slight_smile:

Great, but still, I’d like to figure out what happens… :frowning:
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?

Yes no problem

I actually have an issue with our Cloudbees CI and had to open a ticket there.
I’ll keep you updated.


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?

You have to add this new plugin repository and enable snapshots for it.



with propagateSystemProperties = false → log1.txt
with propagateSystemProperties = true → log2.txt

log1.txt (10.4 KB)

log2.txt (11.1 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

and java interprets “scala_maven_executions.MainWithArgsInFile” as the System property value instead of the main class and “” as the main class instead of an argument for MainWithArgsInFile.

Our fault for not protecting String values.

Will fix, thanks for your help!


your welcome :slight_smile:

FYI, I’ve pushed a fix and built a new snapshot.