IllegalStateException: ProjectLock scanning with CommunityEdition using Gradle, Maven or Scanner

(Tad Yeager) #1

I’ve tried using gradle, maven and scanner, with the latest docker image of the community edition of Sonarqube. I’m having the same issue on multiple projects using gradle, maven, scanner.

sonar-scanner --version

INFO: Scanner configuration file: /Users/xxx/Applications/SonarQubeScanner/conf/
INFO: Project root configuration file: /Users/xxx/src/cv/someName/
INFO: SonarQube Scanner
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.3 x86_64

11:30:55.255 INFO: Load/download plugins (done) | time=100ms
11:30:55.321 DEBUG: Plugins:
11:30:55.322 DEBUG: * Dependency-Check 1.1.1 (dependencycheck)
11:30:55.322 DEBUG: * GitHub (github)
11:30:55.322 DEBUG: * SonarPython (python)
11:30:55.322 DEBUG: * SonarGo (go)
11:30:55.322 DEBUG: * OpenID Connect Authentication for SonarQube 1.0.4 (authoidc)
11:30:55.322 DEBUG: * Svn (scmsvn)
11:30:55.322 DEBUG: * SonarJS (javascript)
11:30:55.323 DEBUG: * Findbugs 3.8.0 (findbugs)
11:30:55.323 DEBUG: * SonarC# (csharp)
11:30:55.323 DEBUG: * SonarJava (java)
11:30:55.323 DEBUG: * LDAP (ldap)
11:30:55.323 DEBUG: * Git (scmgit)
11:30:55.323 DEBUG: * SonarXML (xml)
11:30:55.323 DEBUG: * Pitest 0.9.1 (pitest)
11:30:55.323 DEBUG: * SoftVis3D Sonar plugin 1.0.1 (softvis3d)
11:30:55.323 DEBUG: * SonarPHP (php)
11:30:55.324 DEBUG: * GitLab 3.0.2 (gitlab)
11:30:55.324 DEBUG: * SonarTS (typescript)

I’ve had a look at most of the issues here:
This looked similar to what’s going on with me except I’m on master branch:

Here’s my command line:
sonar-scanner -X -Dsonar.login=03b2b66baab7bec9c90d04ea63e23a0fe9dadbc9 -Dsonar.projectKey=cv.someName -Dsonar.ProjectName=SomeName -Dsonar.sources=./src

Top of the exception callstack:
11:30:56.093 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(

Top of the bottom of the ‘caused by’ portion of the callstack:
Caused by: org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException: com.talanlabs.sonar.plugins.gitlab.CommitProjectBuilder has unsatisfied dependency ‘class com.talanlabs.sonar.plugins.gitlab.CommitFacade’ for constructor ‘public com.talanlabs.sonar.plugins.gitlab.CommitProjectBuilder(com.talanlabs.sonar.plugins.gitlab.GitLabPluginConfiguration,com.talanlabs.sonar.plugins.gitlab.SonarFacade,com.talanlabs.sonar.plugins.gitlab.CommitFacade)’ from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@30b19518:247<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@7ba8c737:9<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@58670130:50<|

I’ve also tried running scanner against maven and gradle example projects and get the same ProjectLock issue.

Any ideas?

(Tad Yeager) #2

The community edition I was using was started from docker image.
Switching to downloaded image, no error or problem.