Sonar gradle plugin error

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    sonar gradle plugin v4.4.1.3373
  • how is SonarQube deployed: zip, Docker, Helm
    using sonarcloud server
  • what are you trying to achieve
    run sonar analysis and send data to sonarcloud
  • what have you tried so far to achieve this
    analysis performed and sent correctly, but build always produces the following error:
Error: Exception in thread "OkHttp TaskRunner" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Ref$IntRef

	at okhttp3.internal.http2.Http2Connection.shutdown(Http2Connection.kt:419)
	at okhttp3.internal.http2.Http2Connection.close$okhttp(Http2Connection.kt:449)
	at okhttp3.internal.http2.Http2Connection$ReaderRunnable.invoke(Http2Connection.kt:627)
	at okhttp3.internal.http2.Http2Connection$ReaderRunnable.invoke(Http2Connection.kt:609)
	at okhttp3.internal.concurrent.TaskQueue$execute$1.runOnce(TaskQueue.kt:98)
	at okhttp3.internal.concurrent.TaskRunner.runTask(TaskRunner.kt:116)
	at okhttp3.internal.concurrent.TaskRunner.access$runTask(TaskRunner.kt:42)
	at okhttp3.internal.concurrent.TaskRunner$runnable$
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Ref$IntRef
	at java.base/
	at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(
	at java.base/java.lang.ClassLoader.loadClass(
	... 11 more

Hello Sandro,

Thanks for the report. To investigate the issue further, could you please provide me the following information:

  • Do you experience the same issue when you use Sonar Gradle Plugin version
  • Are you using Kotlin DSL or Groovy to configure your Gradle builds?
  • Is this a Kotlin or Java project? If Kotlin, is it a Multiplatform project?
  • Is it an Android project?
  • Can you please provide full logs? I have opened a private channel via which you can send the logs if you cannot share them publicly.
  • Can you share the project where this happens? If the project is private, can you share a minimal reproducer (e.g. on GitHub) that demonstrates this problem?