0
votes

We are using

  • TFS 2015
  • SonarQube 5.6
  • .NET 4.5
  • jre1.8.0_112
  • jdk1.8.0_112

We have installed and Configure SonarQube on Same server in same box where TFS & TFS build is installed & configured.

All steps within build are succeeded other than Sonar Scanner, It shows below error.

I checked and JAVA_HOME variable is created and its pointed to correct path, i also checked with JDK path, but showing same error. I also checked with short path.

I am not sure what i am missing here.

2017-02-16T09:14:22.3510000Z Calling the SonarQube Scanner... 2017-02-16T09:14:22.3510000Z ERROR: JAVA_HOME exists but does not point to a valid Java home 2017-02-16T09:14:22.3510000Z folder. No "\bin\java.exe" file can be found there. 2017-02-16T09:14:22.3520000Z ##[error]The SonarQube Scanner did not complete successfully 2017-02-16T09:14:22.3520000Z 14:44:22.31 Creating a summary markdown file... 2017-02-16T09:14:22.3520000Z ##[error]Post-processing failed. Exit code: 1 2017-02-16T09:14:22.3590000Z ##[error]Unexpected exit code received from batch file: 1 2017-02-16T09:14:22.3710000Z The build was not set to fail if the associated quality gate fails.

1
Have you tried re-installed jre/jdk and set the path? - Cece Dong - MSFT
Yes, i have reinstalled jre and then also installed JDK, after that restarted server also - Manish Joisar
Can you try adding a "Command Line" task with "set" command in your build definition to display the environment variables during the build and check the value for "JAVE_HOME"? - Eddie Chen - MSFT

1 Answers

0
votes

Check your JAVA_HOME path, and make sure it points to the java root folder, in your case to C:\Program Files (x86)\Java\1.8.0_112 or C:\Program Files\Java\1.8.0_112.

Also, check this case to see whether you have the semicolon in the path.