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

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,


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?

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.

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

1 Like

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

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.

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

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:


1 Like

Hi Emre,

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

1 Like

FYI you need to restart the Azure DevOps build agent service for it to detect new capabilities e.g. that Java has been installed on the server (that’s why it worked after rebooting the server).