Template for a good bug report, formatted with Markdown:
versions used - 7.7
error observed (wrap logs/code around triple quote ``` for proper formatting)
steps to reproduce
potential workaround
P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour
Hi
I am using sonarqube 7.7 and have JAVA_HOME set up as environment variable “C:\Program Files\Java\jre1.8.0_231”.
I am using VSTS and using Run Code Analysis step template.
Even set the path in wrapper.config file as well. But still getting the same issue
Calling the SonarQube Scanner…
2020-06-09T23:28:59.1323788Z
2020-06-09T23:28:59.1323788Z ERROR: JAVA_HOME exists but does not point to a valid Java home
2020-06-09T23:28:59.1323788Z folder. No “\bin\java.exe” file can be found there.
This is the command in Run Analysis Code is:
D:\agents\02_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.10.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
Here is the command in prepare Analysis:-
D:\agents\02_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.10.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:Messaging.DataAccessService
I did installed JDK as well and tried the same thing.
It was working last week, just stop working this Monday.
Hello Sunil
thanks for joining SonarSource Community. Welcome!
I’ve noted several things from your report:
I am using sonarqube 7.7 and have JAVA_HOME set up as environment variable “C:\Program Files\Java\jre1.8.0_231”.
I am using VSTS and using Run Code Analysis step template.
Even set the path in wrapper.config file as well. But still getting the same issue
the JAVA_HOME variable environment must be set for the JVM that runs with your analysis, in your build agent. The wrapper.conf file you are mentioning is probably the one you have with SonarQube, and has no effect on the scanner.
This is the command in Run Analysis Code is:
D:\agents\02_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.10.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
Here is the command in prepare Analysis:-
D:\agents\02_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.10.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:Messaging.DataAccessService
for troubleshooting your build you might set the logs at DEBUG level by adding the ‘-X’ option to your commands
I did installed JDK as well and tried the same thing.
did you install it for the build agent?
It was working last week, just stop working this Monday.
I would thus investigate any change with the build agent and in particular if Java was not removed or upgraded there.
Once you are sure about the java path there, you might set the JAVA_HOME at system level (if you have admin rights there) or set the JAVA_HOME variable from your pipeline.
I resolved the issue. Actually Jaav was updated on Build server in regular path updates by our system, but it didn’t update the System variable. I updated the JAVA_HOME system Variable and then restart our build server. It is working now.