UnsupportedOperationException in 4.4.1

Failed to analyze com.github.benmanes.caffeine.cache.LocalLoadingCache#refresh(Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture; due to an exception; skipping.
java.lang.UnsupportedOperationException: null
at org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation.newMessageFormatting(DefaultIssueLocation.java:97)
at com.sonarsource.A.C$_A.A(na:817)

The full error log repeats this for many files. The execution completes successfully and SonarCloud seems happy with the result.


It looks like you’re using Gradle. Can you add the --debug flag and point us to those logs? Also, can you provide some detail on your SonarQube instance? Specifically, what version are you analyzing against?


Thanks Ann,

I am using this SonarCloud project and this is the gradle plugin’s configuration. Here is the debug log.

1 Like


Thanks for the debug logs. In addition to the stacktraces, I see a lot of skipping and abandoning. I’m going to flag this for the team, along with a slightly cleaned up copy of the pertinent-seeming part of the logs.
tmp.log (3.2 MB)



Hello @ben-manes,

Thanks for the detailed information about the issue you encounter.

I tried to rerun the analysis on my side using gradle and I was able to reproduce the error. However, when I don’t use gradle, but sonar-scanner, a tool to run sonar analysis without using a particular build tool like maven or gradle, the analysis is successful.

So my first guess is that a problem is coming from a misconfiguration between gradle and sonar. I found in the logs the line :
2023-10-09T17:40:22.3554359Z - Task :sonarof typeorg.sonarqube.gradle.SonarTask: execution of task ':sonar' caused invocation of 'Task.extensions' in other task at execution time which is unsupported.
This line may be the root cause of the problem. I’ll continue to investigate and let you know if I find an explanation.

I keep you in touch,

1 Like

Thanks Thomas! Looking back and I see that warning in logs where no exceptions were encountered. It might be a plugin version issue, a Gradle version issue, or build configuration. I think running a test with the versions downgraded might be a good experiment.

Isolating to where it began failing in the logs, and it’s more confusing. An unrelated build had a dependency update (logs) while before the build was fine (logs). It might be caching masking the issue earlier so it’s unclear what the root cause might be.

1 Like