[JIRA] (JENKINS-61474) Tools installation for SonarQube Scanner fails with nullPointerException

14 views
Skip to first unread message

papanito@wyssmann.com (JIRA)

unread,
Mar 13, 2020, 10:51:03 AM3/13/20
to jenkinsc...@googlegroups.com
Adrian Wyssmann created an issue
 
Jenkins / Bug JENKINS-61474
Tools installation for SonarQube Scanner fails with nullPointerException
Issue Type: Bug Bug
Assignee: Unassigned
Components: workflow-basic-steps-plugin
Created: 2020-03-13 14:50
Environment: Windows 2016
jenkins 2.204.2
Priority: Blocker Blocker
Reporter: Adrian Wyssmann

Summary

Automatic tool installation for SonarQube Scanner fails with

 

java.lang.NullPointerException at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:150) at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)

Details

I have the following tool configuration for SonarQube Scanner under "Global Tool Configuration"

 

I call the automatic tool installation as follows:

 

def scannerName = "SonarQube Scanner"
   def sqScannerHome
try {
   sqScannerHome = tool scannerName
} catch(Exception ex) {
   echo "[ERROR] Problem installing '${scannerName}'\n${ex}"
   throw ex
}

This call ends in the following error

java.lang.NullPointerException
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:150)
	at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	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:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

This worked so I suspected one of the plugin updates broke it so I've tried the current versions, and the previous versions of these plugins:

Pipeline: API 2.40 2.39
Pipeline: Basic Steps 2.19 2.18
SonarQube Scanner 2.11 2.10

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

papanito@wyssmann.com (JIRA)

unread,
Mar 13, 2020, 11:01:03 AM3/13/20
to jenkinsc...@googlegroups.com
Adrian Wyssmann commented on Bug JENKINS-61474
 
Re: Tools installation for SonarQube Scanner fails with nullPointerException

Other tool installations are not affected so e.g. JDK installation works fine
Unpacking https://generic.intra/local-generic-devops/AdoptOpenJDK/OpenJDK11U-jdk_x86-32_windows_hotspot_11.0.5_10.zip to D:\jenkins\tools\ci-home\tools\hudson.model.JDK\JAVA-DEFAULT on xx-xxxx

papanito@wyssmann.com (JIRA)

unread,
Mar 16, 2020, 1:47:03 AM3/16/20
to jenkinsc...@googlegroups.com
Adrian Wyssmann updated an issue
 
Change By: Adrian Wyssmann
Attachment: image-2020-03-16-06-46-01-979.png

papanito@wyssmann.com (JIRA)

unread,
Mar 16, 2020, 1:49:02 AM3/16/20
to jenkinsc...@googlegroups.com
 
Re: Tools installation for SonarQube Scanner fails with nullPointerException

The same error also occurs when using a fixed installation path

aThis path exists on the slave

papanito@wyssmann.com (JIRA)

unread,
Mar 16, 2020, 1:49:02 AM3/16/20
to jenkinsc...@googlegroups.com

papanito@wyssmann.com (JIRA)

unread,
Mar 16, 2020, 1:50:02 AM3/16/20
to jenkinsc...@googlegroups.com
Adrian Wyssmann updated an issue
h2. Summary

Automatic tool installation for SonarQube Scanner fails with

 
{code:java}

java.lang.NullPointerException at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:150) at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
{code}
h2. Details


I have the following tool configuration for SonarQube Scanner under "Global Tool Configuration"

 
* Name: SonarQube Scanner
* [x] Install automatically: Extract *.zip/*.tar.gz
** label: ""
** Download URL for binary archive: "{{[https://generic.intra/remote-generic-sonarsource/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip]}}"
** Subdirectory of extracted archive: {{sonar-scanner-4.3.0.2102}}


I call the automatic tool installation as follows:

 
{code:java}

def scannerName = "SonarQube Scanner"
   def sqScannerHome
try {
   sqScannerHome = tool scannerName
} catch(Exception ex) {
   echo "[ERROR] Problem installing '${scannerName}'\n${ex}"
   throw ex
}
{code}

This call ends in the following error
{code:java}

java.lang.NullPointerException
at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:150)
at org.jenkinsci.plugins.workflow.steps.ToolStep$Execution.run(ToolStep.java:133)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{code}

This worked so I suspected one of the plugin updates broke it so I've tried the current versions, and the previous versions of these plugins:
Reply all
Reply to author
Forward
0 new messages