For anybody else who ends up here, this is the solution:
Another solution is to upgrade SonarJava on the server to a version greater than 5.8
Related: File won't be refreshed because there were errors during analysis