Leo
(Leo)
June 21, 2018, 4:18am
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,
Leo
emre
(Emre Dundar)
June 21, 2018, 6:54am
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
(Leo)
June 21, 2018, 8:53am
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
(Emre Dundar)
June 21, 2018, 9:04am
4
java should be installed on build agent to run sonarqube analysis. You can add it as a demand of your build definition.
1 Like
Leo
(Leo)
June 21, 2018, 9:14am
5
Yes, it has that demand on Agend phase. But no java installed on agent server.
emre
(Emre Dundar)
June 21, 2018, 11:02am
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
(Leo)
June 22, 2018, 1:53am
7
Yes, we are using a private agent and we installed java8 yesterday, but nothing changed, the error is same.
emre
(Emre Dundar)
June 22, 2018, 6:17am
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:
1 Like
Leo
(Leo)
June 22, 2018, 9:25am
9
Hi Emre,
After we just restart the server, it works! No errors now. Thanks for your help.
1 Like
duncanp
(Duncan Pocklington)
June 3, 2019, 11:59am
10
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).