Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException from violations-lib #36

Closed
tuukkamustonen opened this issue Aug 11, 2017 · 4 comments
Closed

java.lang.NullPointerException from violations-lib #36

tuukkamustonen opened this issue Aug 11, 2017 · 4 comments

Comments

@tuukkamustonen
Copy link

tuukkamustonen commented Aug 11, 2017

Hi Tomas, the plugin has been running silk smooth but I now encountered a problem:

11:40:38 ---
11:40:38 --- Jenkins Violation Comments to Bitbucket Server ---
11:40:38 ---
11:40:38 bitbucketServerUrl: https://stash.XXXXX.com
11:40:38 projectKey: COSMOS
11:40:38 repoSlug: cosmos
11:40:38 pullRequestId: 330
11:40:38 usernamePasswordCredentialsId: true
11:40:38 username: false
11:40:38 password: false
11:40:38 createSingleFileComments: true
11:40:38 createCommentWithAllSingleFileComments: false
11:40:38 commentOnlyChangedContent: true
11:40:38 commentOnlyChangedContentContext: 5
11:40:38 minSeverity: INFO
11:40:38 ANDROIDLINT with pattern null
11:40:38 CHECKSTYLE with pattern null
11:40:38 CODENARC with pattern null
11:40:38 CLANG with pattern null
11:40:38 CPD with pattern null
11:40:38 CPPCHECK with pattern null
11:40:38 CPPLINT with pattern null
11:40:38 CSSLINT with pattern null
11:40:38 FINDBUGS with pattern null
11:40:38 FLAKE8 with pattern cosmos/.*/pycodestyle\.out$
11:40:38 FXCOP with pattern null
11:40:38 GENDARME with pattern null
11:40:38 JCREPORT with pattern null
11:40:38 JSHINT with pattern null
11:40:38 LINT with pattern null
11:40:38 KLOCWORK with pattern null
11:40:38 MYPY with pattern cosmos/.*/mypy\.out$
11:40:38 GOLINT with pattern null
11:40:38 PERLCRITIC with pattern null
11:40:38 PITEST with pattern null
11:40:38 PMD with pattern null
11:40:38 PYDOCSTYLE with pattern cosmos/.*/pydocstyle\.out$
11:40:38 PYLINT with pattern cosmos/.*/pylint\.out$
11:40:38 RESHARPER with pattern null
11:40:38 SBTSCALAC with pattern null
11:40:38 SIMIAN with pattern null
11:40:38 STYLECOP with pattern null
11:40:38 XMLLINT with pattern null
11:40:38 ZPTLINT with pattern null
11:40:38 Using username and password from credentials
11:40:38 Will comment 330
11:40:38 Workspace: /home/jenkins/workspace/COSMOS-pullrequests
11:40:38 java.lang.NullPointerException
11:40:38 	at se.bjurr.violations.lib.ViolationsReporterApi.violations(ViolationsReporterApi.java:55)
11:40:38 	at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.doPerform(JvctbPerformer.java:82)
11:40:38 	at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:195)
11:40:38 	at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer$1.invoke(JvctbPerformer.java:183)
11:40:38 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2749)
11:40:38 	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
11:40:38 	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
11:40:38 	at hudson.remoting.Request$2.run(Request.java:336)
11:40:38 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
11:40:38 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
11:40:38 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
11:40:38 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
11:40:38 	at java.lang.Thread.run(Thread.java:748)
11:40:38 	at ......remote call to flexible-docker-04(Native Method)
11:40:38 	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
11:40:38 	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
11:40:38 	at hudson.remoting.Channel.call(Channel.java:830)
11:40:38 	at hudson.FilePath.act(FilePath.java:987)
11:40:38 	at hudson.FilePath.act(FilePath.java:976)
11:40:38 	at org.jenkinsci.plugins.jvctb.perform.JvctbPerformer.jvctsPerform(JvctbPerformer.java:182)
11:40:38 	at org.jenkinsci.plugins.jvctb.ViolationsToBitbucketServerRecorder.perform(ViolationsToBitbucketServerRecorder.java:68)
11:40:38 	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
11:40:38 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
11:40:38 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735)
11:40:38 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
11:40:38 	at hudson.model.Build$BuildExecution.post2(Build.java:186)
11:40:38 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
11:40:38 	at hudson.model.Run.execute(Run.java:1760)
11:40:38 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
11:40:38 	at hudson.model.ResourceController.execute(ResourceController.java:97)
11:40:38 	at hudson.model.Executor.run(Executor.java:405)

This may be related to a recent Jenkins upgrade but I'm not sure. I'm running:

  • Jenkins 2.60.2
  • violation-comments-to-stash-plugin 1.52 (the latest in update center). I was running 1.51 earlier, but upgrading didn't change anything.

The error points to https://github.com/tomasbjerre/violations-lib/blob/master/src/main/java/se/bjurr/violations/lib/ViolationsReporterApi.java#L55 but the bundled file is probably of different revision...

@tomasbjerre
Copy link
Contributor

I don't think you had all these 11:40:38 ANDROIDLINT with pattern null in the log before right? Re-configuring the job, just saving it again, might be a quick fix.

@tuukkamustonen
Copy link
Author

tuukkamustonen commented Aug 11, 2017

Thanks for the instant reply! I was stuck in a meeting so it took me a while to notice :)

Re-configuring the job, just saving it again, might be a quick fix.

That did the trick! The nulls are gone from the output:

13:20:09 ANDROIDLINT with pattern 
13:20:09 CHECKSTYLE with pattern 
13:20:09 CODENARC with pattern 
13:20:09 CLANG with pattern 
13:20:09 CPD with pattern 
...

Somehow I remember I may have seen this issue before... but what causes it? I think I was running 1.51 for months and it suddenly started to fail like this. Did Jenkins upgrade somehow trigger it?

@tomasbjerre
Copy link
Contributor

tomasbjerre commented Aug 11, 2017 via email

@tomasbjerre
Copy link
Contributor

Released a fix for that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants