[JIRA] (JENKINS-38091) java.lang.NullPointerException in htmlpublisher plugin

8 views
Skip to first unread message

amelnyk.ukr@gmail.com (JIRA)

unread,
Sep 9, 2016, 4:02:02 AM9/9/16
to jenkinsc...@googlegroups.com
Andrii Melnyk created an issue
 
Jenkins / Improvement JENKINS-38091
java.lang.NullPointerException in htmlpublisher plugin
Issue Type: Improvement Improvement
Assignee: mcrooney
Components: htmlpublisher-plugin, workflow-api-plugin, workflow-cps-global-lib-plugin, workflow-cps-plugin
Created: 2016/Sep/09 8:01 AM
Environment: jenkins 2.7.3 (from http://pkg.jenkins.io/debian-stable)
htmlpublisher-plugin 1.11
workflow-api-plugin 2.3
workflow-cps-plugin 2.15
workflow-cps-global-lib-plugin 2.3
Priority: Minor Minor
Reporter: Andrii Melnyk

After upgrading workflow plugins to latest versions:

  • workflow-api-plugin 2.3
  • workflow-cps-plugin 2.15
  • workflow-cps-global-lib-plugin 2.3

htmlpublisher-plugin stopped working, throwing exception:

java.lang.NullPointerException
	at hudson.FilePath.isAbsolute(FilePath.java:281)
	at hudson.FilePath.resolvePathIfRelative(FilePath.java:266)
	at hudson.FilePath.<init>(FilePath.java:262)
	at hudson.FilePath.child(FilePath.java:1295)
	at htmlpublisher.HtmlPublisher.publishReports(HtmlPublisher.java:205)
	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:67)
	at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:120)
	at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151)
	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:21)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:115)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:123)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:123)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:16)
	at WorkflowScript.run(WorkflowScript:180)
	at org.jenkinsci.plugins.docker.workflow.Docker$Image.inside(jar:file:/var/lib/jenkins/plugins/docker-workflow/WEB-INF/lib/docker-workflow.jar!/org/jenkinsci/plugins/docker/workflow/Docker.groovy:123)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:48)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
	at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
	at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
	at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:103)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:50)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor283.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
	at com.cloudbees.groovy.cps.Next.step(Next.java:58)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:324)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:78)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:236)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:224)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Workaround Downgrade next plugins:

  • workflow-api-plugin to 2.2
  • workflow-cps-plugin to 2.13
  • workflow-cps-global-lib-plugin to 2.2
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

amelnyk.ukr@gmail.com (JIRA)

unread,
Sep 9, 2016, 4:03:03 AM9/9/16
to jenkinsc...@googlegroups.com

janne.magnusson@gmail.com (JIRA)

unread,
Sep 13, 2016, 7:29:01 AM9/13/16
to jenkinsc...@googlegroups.com
Jan Magnusson commented on Bug JENKINS-38091
 
Re: java.lang.NullPointerException in htmlpublisher plugin

We are seeing this on jenkins 2.7.4 on windows as well.

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 10:24:03 AM9/13/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: workflow-api-plugin
Component/s: workflow-cps-global-lib-plugin
Component/s: workflow-cps-plugin

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 10:24:04 AM9/13/16
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 10:24:05 AM9/13/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Labels: pipeline regression

jglick@cloudbees.com (JIRA)

unread,
Sep 13, 2016, 10:25:07 AM9/13/16
to jenkinsc...@googlegroups.com

What was your script? Steps to reproduce from scratch? Did you check the recommended syntax in Snippet Generator? Perhaps related to a fix Andrew Bayer made to parsing of single-argument steps.

leonov.viacheslav@gmail.com (JIRA)

unread,
Sep 13, 2016, 11:20:04 AM9/13/16
to jenkinsc...@googlegroups.com

We have the same problem and our script is:
publishHTML(target: [ reportName: 'HTML Test Report',
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'fastlane/test_output',
reportFiles: 'report.html'])

amelnyk.ukr@gmail.com (JIRA)

unread,
Sep 13, 2016, 11:28:02 AM9/13/16
to jenkinsc...@googlegroups.com

it seems, that we should use another syntax, generated by Snippet Generator
I tested variant without "target"

publishHTML([reportName: 'HTML Test Report',
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'fastlane/test_output',
reportFiles: 'report.html'])

amelnyk.ukr@gmail.com (JIRA)

unread,
Sep 13, 2016, 11:28:03 AM9/13/16
to jenkinsc...@googlegroups.com
Andrii Melnyk edited a comment on Bug JENKINS-38091
it seems, that we should use another syntax, generated by *Snippet Generator*

I tested variant without "target"
{noformat}

publishHTML([reportName: 'HTML Test Report',
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'fastlane/test_output',
reportFiles: 'report.html'])
{noformat}

and it's working

amelnyk.ukr@gmail.com (JIRA)

unread,
Sep 13, 2016, 12:22:02 PM9/13/16
to jenkinsc...@googlegroups.com
Andrii Melnyk closed an issue as Not A Defect
Change By: Andrii Melnyk
Status: Open Closed
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages