SonarQube VSTS/TFS Marketplace Extension Error---Can't run a build


(Leo) #1

Hi there,

As we are using SonarQube plugin for VSTS, when we run a build it will throw an exception which looks like:

But, if we just disable the step Run Code Analysis and run the build again, it won’t throw any exceptions and build successfully.

So, does anyone ever meet this issue? Hope you can help us.

Many thanks,


(Emre Dundar) #2

Hi Leo,

Do you work with TFS or VSTS?
If you use TFS, can you please check Java-8 is installed on your build agent?

(Leo) #3

Hi Emre,

we are working with VSTS and we run the builds on our VSTS agent server. I checked the server and I am sure there no java installed on the server.

(Emre Dundar) #4

java should be installed on build agent to run sonarqube analysis. You can add it as a demand of your build definition.

(Leo) #5

Yes, it has that demand on Agend phase. But no java installed on agent server.

(Emre Dundar) #6

I think you have a private build agent. The hosted agents already have Java8 capability.

Could you please double check the agent queues and the java8 capability of the agent running your failed build?
If you have a private build agent, you need to install java8 manually on your server.

(Leo) #7

Yes, we are using a private agent and we installed java8 yesterday, but nothing changed, the error is same.

(Emre Dundar) #8

Do you have these 3 java capabilities on agent queues:

If you don’t see them, please add your paths manually.

It’s better to add a command line task to test java8 is ok or not for your build definition:


(Leo) #9

Hi Emre,

After we just restart the server, it works! No errors now. Thanks for your help.