Java Nullable annotation causes analyser to fail on certain files

Hey there,

I’m trying to analyse one of our Java 8 projects with Sonarqube, and I’m seeing this error crop up in the logs on our CI:

ERROR: Unable to run check class - on file <snip> org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type javax.annotation.Nullable cannot be resolved. It is indirectly referenced from required .class files

I’ve checked our Gradle files and the nullable package,, is being included transitively. Explicitly adding it as a dependency doesn’t seem to help.

We’re using SonarQube with SonarScanner version and v3.0 of the Gradle plugin.

Any idea how I might go about troubleshooting this further?

Hello @lewis-porter-inspera,

Unfortunately, without a small project reproducing the issue, it will be hard to identify the what’s causing the issue. Could you design a small project with 1-2 classes which would consistently fail with the same issue?