[jenkins plugin - 1.0.1] NPE in GatlingPublisher

Hi,

I made a jenkins job some weeks ago and upgraded the jenkins gatling plugin a few days ago to 1.0.1.
I ran my job and got the following stacktrace :

**18/01/2013 10:48:14** [INFO] ------------------------------------------------------------------------
**18/01/2013 10:48:14** [INFO] BUILD SUCCESSFUL
**18/01/2013 10:48:14** [INFO] ------------------------------------------------------------------------
**18/01/2013 10:48:14** [INFO] Total time: 30 seconds
**18/01/2013 10:48:14** [INFO] Finished at: Fri Jan 18 10:48:14 CET 2013
**18/01/2013 10:48:14** [INFO] Final Memory: 26M/195M
**18/01/2013 10:48:14** [INFO] ------------------------------------------------------------------------
**18/01/2013 10:48:14** Waiting for Jenkins to finish collecting data
**18/01/2013 10:48:15** channel stopped
**18/01/2013 10:48:15** ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception
**18/01/2013 10:48:15** [java.lang.NullPointerException
](http://stacktrace.jenkins-ci.org/search?query=java.lang.NullPointerException)**18/01/2013 10:48:15** 	at [com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform(GatlingPublisher.java:47)](http://stacktrace.jenkins-ci.org/search/?query=com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform&entity=method)
**18/01/2013 10:48:15** 	at [hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)](http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$3.perform&entity=method)
**18/01/2013 10:48:15** 	at [hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.perform&entity=method)
**18/01/2013 10:48:15** 	at [hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps&entity=method)
**18/01/2013 10:48:15** 	at [hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:946)](http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2&entity=method)
**18/01/2013 10:48:15** 	at [hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.post&entity=method)
**18/01/2013 10:48:15** 	at [hudson.model.Run.execute(Run.java:1568)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method)
**18/01/2013 10:48:15** 	at [hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)](http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild.run&entity=method)
**18/01/2013 10:48:15** 	at [hudson.model.ResourceController.execute(ResourceController.java:88)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method)
**18/01/2013 10:48:15** 	at [hudson.model.Executor.run(Executor.java:236)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method)
**18/01/2013 10:48:15** Notifying upstream projects of job completion
**18/01/2013 10:48:15** Finished: FAILURE


I checked my job configuration and noticed the "Activer le suivi de la simulation" (yes, my jenkins is in french and I don't know how it's translated in english :p ) was not checked so I checked it an re-run the job.

I now had the following stack trace :

**18/01/2013 10:56:15** [INFO] ------------------------------------------------------------------------
**18/01/2013 10:56:15** [INFO] BUILD SUCCESSFUL
**18/01/2013 10:56:15** [INFO] ------------------------------------------------------------------------
**18/01/2013 10:56:15** [INFO] Total time: 25 seconds
**18/01/2013 10:56:15** [INFO] Finished at: Fri Jan 18 10:56:15 CET 2013
**18/01/2013 10:56:15** [INFO] Final Memory: 26M/236M
**18/01/2013 10:56:15** [INFO] ------------------------------------------------------------------------
**18/01/2013 10:56:15** channel stopped
**18/01/2013 10:56:15** ERROR: Publisher com.excilys.ebi.gatling.jenkins.GatlingPublisher aborted due to exception
**18/01/2013 10:56:15** [java.lang.IllegalArgumentException](http://stacktrace.jenkins-ci.org/search?query=java.lang.IllegalArgumentException): Found more than one Gatling report in results folder, make sure results folder is cleared between two builds.
**18/01/2013 10:56:15** 	at [com.excilys.ebi.gatling.jenkins.GatlingPublisher.saveFullReport(GatlingPublisher.java:83)](http://stacktrace.jenkins-ci.org/search/?query=com.excilys.ebi.gatling.jenkins.GatlingPublisher.saveFullReport&entity=method)
**18/01/2013 10:56:15** 	at [com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform(GatlingPublisher.java:49)](http://stacktrace.jenkins-ci.org/search/?query=com.excilys.ebi.gatling.jenkins.GatlingPublisher.perform&entity=method)
**18/01/2013 10:56:15** 	at [hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)](http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.BuildStepMonitor$3.perform&entity=method)
**18/01/2013 10:56:15** 	at [hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.perform&entity=method)
**18/01/2013 10:56:15** 	at [hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps&entity=method)
**18/01/2013 10:56:15** 	at [hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:946)](http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2&entity=method)
**18/01/2013 10:56:15** 	at [hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.post&entity=method)
**18/01/2013 10:56:15** 	at [hudson.model.Run.execute(Run.java:1568)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method)
**18/01/2013 10:56:15** 	at [hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)](http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild.run&entity=method)
**18/01/2013 10:56:15** 	at [hudson.model.ResourceController.execute(ResourceController.java:88)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method)
**18/01/2013 10:56:15** 	at [hudson.model.Executor.run(Executor.java:236)](http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method)
**18/01/2013 10:56:15** Notifying upstream projects of job completion
**18/01/2013 10:56:15** Finished: FAILURE

I checked the "Delete workspace before build starts" and re-run the job and it finally succeeded.

So, I don't know if there is something here which can be considered as a bug but at least if someone else gets the same issue, he would see how I resolved it in my case ;)

Hi,

The first stacktrace you got looks like an issue with Jenkins’ upgrade process (which is, IMO, far from perfect : Jenkins’ configuration serialization doesn’t like changes…)
It could explain why the checkbox was unchecked (which is checked by default), but I’ll check and if it’s the case, I’ll add a notice in the plugin’s documentation to warn about that issue.

Your other stacktrace is perfectly normal : we expect to find only one report in the results folder, the exception’s message is pretty clear about it :wink:

Cheers,

Pierre

I did some tests on Jenkins and it is indeed a upgrade issue.
The checkbox is checked by default, as it should and I didn’t get a NPE in GatlingPublisher.
I’ll document it.