Sonar - Unable to load component class org.sonar.scanner.scan.ProjectLock

不打扰是莪最后的温柔 提交于 2019-12-03 23:45:47

I've got this too, but I was using gradle to run sonar for sonarcloud.io, once I turned on --stacktrace and --debug it was clear from the logs I was getting this error because my credentials did not get recognized by the sonar server. I've double checked them and after changing to the correct credentials all went fine.

So besides trying to run it with -X as suggested to get more info, I'd suggest you also try to double check your credentials.

I had the same problem while I was trying to configure Pull Request checks for Sonarqube on Github. Credentials were correct in my case but I was giving sonar.github.repository=myorg:myrepository and it was causing this error. I fixed it by changing it to sonar.github.repository=myorg/myrepository

Maybe it can help someone...

I had the same exact error when trying to trigger sonar analysis from within Jenkins, after houres of searching, i figured out that the problem was related to path defintion.

In your sonar-project.properties file or in SonarQube configuration section within your project configuration section, make sure that the property sonar.sources defines a path using forward slashes (/)

the property must be defined like this : sonar.sources=D:/software/jenkins/JenkinsHome/workspace/test_jenkins

and NOT like this : sonar.sources=D:\software\jenkins\JenkinsHome\workspace\test_jenkins

This may be because of owner of project directory and owner of sonar-scanner is different,try granting 755 to project directory, so that sonar-scanner can access this

I encountered this issue too, but I'm able to solve by removing the external SonarQube plugin downloaded from marketplace. I'm not sure whether it can solve your problem, but hope it could help you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!