Upgraded and sonar check stopped working

SonarQube server:

  • Community Edition
  • Version 7.9 LTS

SonarQube Java version: 11 (was 8, but needed to upgrade)
Client Java Version: 11

We are getting the following error on Sonar Ant Task 2.5 Scanner run:

%> ant sonarcheck
[sonar:sonar] Apache Ant(TM) version 1.10.5 compiled on July 10 2018

[sonar:sonar] SonarQube Ant Task version: 2.5

[sonar:sonar] Loaded from: file:sonarqube-ant-task-2.5.jar

[sonar:sonar] User cache: /root/.sonar/cache


build.xml:79: The following error occurred while executing this line:

sonar.xml:96: java.lang.IllegalStateException: not started
||at org.sonarsource.scanner.api.EmbeddedScanner.checkLauncherExists(EmbeddedScanner.java:244)|
||at org.sonarsource.scanner.api.EmbeddedScanner.stop(EmbeddedScanner.java:164)|
||at org.sonarsource.scanner.ant.SonarQubeTask.launchAnalysis(SonarQubeTask.java:101)|
||at org.sonarsource.scanner.ant.SonarQubeTask.execute(SonarQubeTask.java:81)|
||at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)|
||at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)|
||at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|
||at java.base/java.lang.reflect.Method.invoke(Method.java:566)|
||at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)|
||at org.apache.tools.ant.Task.perform(Task.java:350)|
||at java.base/java.util.Vector.forEach(Vector.java:1387)|

I tried updating the sonar ant task (was older 2018 2.5 version as seen above, along with updating my sonar.xml file with that new jar name) and when I did I got similar errors and failed again…

[sonar:sonar] Load quality profiles
[sonar:sonar] Load quality profiles (done) | time=124ms
[sonar:sonar] Load active rules
[sonar:sonar] Load active rules (done) | time=1216ms

build.xml:79: The following error occurred while executing this line:
sonar.xml:97: The 'sonar.branch' parameter is no longer supported. You should stop using it. Branch analysis is available in Developer Edition and above. See https://redirect.sonarsource.com/editions/developer.html for more information.

Any help would be appreciated.


I’ve code-formatted the analysis logs in your two posts. So you can do it next time, it’s just ``` on the line before and on the line after. :kissing_heart:

In fact, your second error is very different from the first one. You’ll want to double-check the analysis parameters you’re using.


@ganncamp ty for the help/info!

I have upgraded from 7.3 to 7.9 LTS and i have not changed anything in my configuration. I have not changed any analysis parameters. When I upgraded the check failed, I updated to use the newer version of the sonar ant task jar and I believe I got past the first issue (maybe), but both are still complaining about the sonar.xml and build.xml…pretty much the same location in both errors. What exactly am I supposed to be checking for?


It looks^ like you’re passing a parameter that’s no longer supported in 7.9.



My issue is similar to the above link which you responded to…same situation, except I’m only using the default branch and nothing else, so nothing to merge or whatever.

i removed all mentions of sonar.branch and it worked, have some new errors, will open a new issue/question if I can’t figure it out.

1 Like