[solved] Sonarqube (build step) failing python build with no changes made - Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration


#1

Today i noticed that sonarqube is failing to execute, and it’s causing my builds to fail - it’s not failing because of a code/rule check. The error seems to be “Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration” - full error below.

It was working ok - and if i rebuild an exisitng (passed) build, it works. I get a long set of errors in the console - you can see the full one here: https://travis-ci.org/mnbf9rca/pooheadcardgame/builds/450591244

I tried creating a new branch from master (which hasnt changed since it built successfully), and now this new branch is also failing - even though nothing has changed - see build: 450592691(as a new user, i can’t link to more than 2 URLs in a post)

last successful build is: 450458667

I’ve checked the authentication with sonarcloud - i created a new (2nd) auth token (without revoking the current key) and added that, but it hasnt helped. Any ideas? I’m using sonarcloud to host sonar and i dont see the new branch showing up there: https://sonarcloud.io/project/branches?id=com.pooheadcardgame

20:44:43.166 ERROR: Error during SonarQube Scanner execution

java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectSettings

at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)

at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)

at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)

at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)

at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)

at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)

at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)

at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)

at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)

at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)

at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)

at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)

at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1034)

at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1026)

at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1003)

at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)

at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:82)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:131)

at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)

at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)

at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)

at com.sun.proxy.$Proxy0.execute(Unknown Source)

at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)

at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)

at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)

at org.sonarsource.scanner.cli.Main.execute(Main.java:77)

at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.repository.ProjectRepositories

at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)

at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)

at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)

at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)

at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)

at org.picocontainer.injectors.SingleMemberInjector.getMemberArguments(SingleMemberInjector.java:61)

at org.picocontainer.injectors.MethodInjector.getMemberArguments(MethodInjector.java:100)

at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:112)

at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)

at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)

at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)

at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)

at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)

at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)

at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)

at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)

... 36 more

Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration

at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)

at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)

at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)

at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)

at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)

at org.picocontainer.injectors.SingleMemberInjector.getMemberArguments(SingleMemberInjector.java:61)

at org.picocontainer.injectors.MethodInjector.getMemberArguments(MethodInjector.java:100)

at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:112)

at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)

at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)

at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)

at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)

at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)

at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)

at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)

at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)

... 51 more

Caused by: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0

*

^

at java.util.regex.Pattern.error(Pattern.java:1955)

at java.util.regex.Pattern.sequence(Pattern.java:2123)

at java.util.regex.Pattern.expr(Pattern.java:1996)

at java.util.regex.Pattern.compile(Pattern.java:1696)

at java.util.regex.Pattern.<init>(Pattern.java:1351)

at java.util.regex.Pattern.compile(Pattern.java:1028)

at java.util.regex.Pattern.matches(Pattern.java:1133)

at java.lang.String.matches(String.java:2121)

at com.sonarsource.branch.BranchConfigurationLoaderImpl.computeBranchType(BranchConfigurationLoaderImpl.java:287)

at com.sonarsource.branch.BranchConfigurationLoaderImpl.createBranchConfiguration(BranchConfigurationLoaderImpl.java:162)

at com.sonarsource.branch.BranchConfigurationLoaderImpl.load(BranchConfigurationLoaderImpl.java:82)

at org.sonar.scanner.scan.branch.BranchConfigurationProvider.provide(BranchConfigurationProvider.java:51)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)

at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)

at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)

at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)

at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)

at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)

at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)

at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)

at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)

at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)

at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)

... 66 more

20:44:43.186 DEBUG: Execution getVersion

20:44:43.187 DEBUG: Execution stop

#2

for others looking for an answer, it was this:
Caused by: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
i had set Long living branches pattern: *
returning it to default: Long living branches pattern: (branch|release)-.*

fixed it