Issue in build in Jenkins, with Gatling project.

Hi,

I am facing errors while building my Gatling project in Jenkins:

  1. Plugin used in project with version 2.1.5
io.gatling gatling-maven-plugin ${gatling-plugin.version} test **execute** src/test/resources/data target/gatling/results src/test/resources/request-bodies src/test/scala
  1. I am using Jenkins 1.1.0 plugin which supports Gatling 2.

  2. Error getting in Jenkins:

[INFO] <b>--- gatling-maven-plugin:2.1.5:execute (default) @ flightsearch-api ---
</b>java.lang.NoClassDefFoundError: com/typesafe/zinc/Setup
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
	at java.lang.Class.getMethod0(Class.java:3010)
	at java.lang.Class.getMethod(Class.java:1776)
	at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:43)
	at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.ClassNotFoundException: com.typesafe.zinc.Setup
	at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more

Please advice.

Thanks,
Prakhar Srivastava

I’d say you have a broken maven artifact download in your local maven repository.
Try deleting the com.typesafe.zinc groupId content and start again.

Hi Stephane,

Thanks, but it is running fine in my local.
Issue persists when I build in Jenkins.

Thanks,
Prakhar

Have you tried upgrading to latest Jenkins plugin (1.1.1)?
Do you use a company maven repository that proxifies maven downloads?

Hi,

Tried with latest plugin as well, getting below error:

[INFO] <b>--- gatling-maven-plugin:2.1.5:execute (default) @ flightsearch-api ---
</b>java.lang.NoClassDefFoundError: scala/Function0
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
	at java.lang.Class.getMethod0(Class.java:3010)
	at java.lang.Class.getMethod(Class.java:1776)
	at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:43)
	at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.ClassNotFoundException: scala.Function0
	at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more

Thanks,
Prakhar Srivastava

Hi,

Do you have any suggestions on this…?

Thanks,
Prakhar Srivastava

Please provide a reproducer, like a sample project pushed on Github, that exhibits your issue.