2
votes

Im trying to run a sonar analysis on a Jenkins Job. Im using ant so im using Sonar Runner and sonar.properties in the projects. Im configuring the the binaries to

sonar.binaries=build/ant/classes

After a successfull build Sonar starts and is running a while. But i get a lot of warnings during bytecode analysis.

Im getting WARN XX - Class 'XX' is not accessible through the ClassLoader.

for every class...

I dont really know why classes are all there?

2

2 Answers

5
votes

These are warnings issued by Findbugs, which requires access to source, compile binaries and 3rd party libraries.

To resolve these warnings you need to include an additional sonar.libraries property, populated with the 3rd party jars your code depends upon (See Analaysis Parameters documentation)

0
votes

I actually had the same problem, but that was because of an issue with the maven caches.

I had run mvn clean install in the directory on my local machine, but was running sonar on the directory on a virtual box. This resulted in classes not being found.