I'm using Gradle 3.1 and the Gradle plugin for SonarQube 2.1. When I run gradle sonarqube using SonarQube 6.0 and the SonarQube plugin for Java 4.2, then everything works as expected.
However, when I upgrade SonarQube to 6.1-RC1, then I'm getting the following stacktrace:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:233)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:74)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:55)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.cpd.deprecated.DefaultCpdBlockIndexer
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:69)
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.getLocalInstance(DefaultPicoContainer.java:606)
at org.picocontainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:587)
at org.sonar.core.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:281)
at org.sonar.scanner.bootstrap.BatchExtensionDictionnary.completeBatchExtensions(BatchExtensionDictionnary.java:134)
at org.sonar.scanner.bootstrap.BatchExtensionDictionnary.getExtensions(BatchExtensionDictionnary.java:128)
at org.sonar.scanner.bootstrap.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:107)
at org.sonar.scanner.bootstrap.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:74)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:45)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy110.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.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:90)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:136)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:129)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:118)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:623)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:606)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 14 more
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.cpd.deprecated.CpdMappings
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:69)
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.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:67)
... 62 more
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.plugins.css.cpd.CssCpdMapping
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:69)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
at org.picocontainer.parameters.CollectionComponentParameter.getArrayInstance(CollectionComponentParameter.java:334)
at org.picocontainer.parameters.CollectionComponentParameter.access$100(CollectionComponentParameter.java:49)
at org.picocontainer.parameters.CollectionComponentParameter$1.resolveInstance(CollectionComponentParameter.java:139)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:141)
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.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:67)
... 76 more
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/scan/filesystem/ModuleFileSystem
at org.picocontainer.injectors.ConstructorInjector$3.run(ConstructorInjector.java:403)
at org.picocontainer.injectors.ConstructorInjector$3.run(ConstructorInjector.java:401)
at org.picocontainer.injectors.ConstructorInjector.getConstructors(ConstructorInjector.java:401)
at org.picocontainer.injectors.ConstructorInjector.getSortedMatchingConstructors(ConstructorInjector.java:377)
at org.picocontainer.injectors.ConstructorInjector.getGreediestSatisfiableConstructor(ConstructorInjector.java:128)
at org.picocontainer.injectors.ConstructorInjector.getGreediestSatisfiableConstructor(ConstructorInjector.java:110)
at org.picocontainer.injectors.ConstructorInjector.access$100(ConstructorInjector.java:51)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:331)
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.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:67)
... 92 more
Caused by: java.lang.ClassNotFoundException: org.sonar.api.scan.filesystem.ModuleFileSystem
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 108 more
You are using an incompatible version of the CSS SonarQube plugin. You should be using the latest version (2.1) that is supposed to be compatible with upcoming versions of SonarQube.
Related
I am getting error during SonarScanner execution, while executing the third command:
dotnet begin /k:"project-key"
dotnet build
dotnet end
Below is the screen shot of the exception:
ERROR: Error during SonarScanner execution
INFO: ------------------------------------------------------------------------
java.lang.ExceptionInInitializerError
at com.sonar.sslr.api.typed.ActionParser.(ActionParser.java:59)
at org.sonar.javascript.parser.JavaScriptParser.(JavaScriptParser.java:33)enter code here
at org.sonar.javascript.parser.JavaScriptParserBuilder.createParser(JavaScriptParserBuilder.java:31)
at org.sonar.plugins.javascript.JavaScriptSensor.(JavaScriptSensor.java:136)
at org.sonar.plugins.javascript.JavaScriptSensor.(JavaScriptSensor.java:100)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:145)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:342)
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.getLocalInstance(DefaultPicoContainer.java:606)
at org.picocontainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:587)
at org.sonar.core.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:290)
at org.sonar.scanner.bootstrap.AbstractExtensionDictionnary.completeScannerExtensions(AbstractExtensionDictionnary.java:82)
at org.sonar.scanner.bootstrap.AbstractExtensionDictionnary.getExtensions(AbstractExtensionDictionnary.java:77)
at org.sonar.scanner.bootstrap.AbstractExtensionDictionnary.getFilteredExtensions(AbstractExtensionDictionnary.java:67)
at org.sonar.scanner.sensor.ModuleSensorExtensionDictionnary.selectSensors(ModuleSensorExtensionDictionnary.java:40)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensorsExecutor.java:52)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:52)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.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.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:392)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
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.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module #1bf39d06
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)
at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:336)
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)
at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:174)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:153)
at net.sf.cglib.proxy.Enhancer.(Enhancer.java:73)
... 53 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module #1bf39d06
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at net.sf.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
at net.sf.cglib.core.ReflectUtils.(ReflectUtils.java:52)
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)
... 65 more
ERROR:
The SonarScanner did not complete successfully
18:19:06.186 Post-processing failed. Exit code: 1
SonarScanner exception screenshot
I had same problem and solved it by reverting to openjdk 15.0.2 (16.0 is latest as of today and seems to create this issue, I install using https://community.chocolatey.org/packages/openjdk#versionhistory)
SonarQube gets this error when trying to anaylze the pom.xml. I looked it up in the github repository of SQ and found nothing.
SonarQube version: 7.9.5
Java version: 1.8
[WARNING] Unable to analyse file 'pom.xml'.
java.lang.IllegalStateException: Key 'com.example:app' belongs to a component which is not a Project
at org.sonar.scanner.scan.filesystem.MetadataGenerator.setMetadata(MetadataGenerator.java:72)
at org.sonar.scanner.scan.filesystem.FileIndexer.lambda$indexFile$0(FileIndexer.java:134)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkMetadata(DefaultInputFile.java:91)
at org.sonar.api.batch.fs.internal.DefaultInputFile.charset(DefaultInputFile.java:230)
at org.sonar.api.batch.fs.internal.DefaultInputFile.contents(DefaultInputFile.java:115)
at org.sonarsource.analyzer.commons.xml.XmlFile.<init>(XmlFile.java:78)
at org.sonarsource.analyzer.commons.xml.XmlFile.create(XmlFile.java:89)
at org.sonar.plugins.java.XmlFileSensor.scanFile(XmlFileSensor.java:102)
at org.sonar.plugins.java.XmlFileSensor.execute(XmlFileSensor.java:86)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.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.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
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.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
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.$Proxy25.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:65)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:104)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
Caused by: org.sonar.api.utils.MessageException: Key 'com.example:app' belongs to a component which is not a Project
With SQ 5.6.7 and Sonar-cxx 0.9.8, SonarQube doesn't start after feeding RATS rules. Seems like the rules in invalid XML are stored in MySQL. How can the rules removed from MySQL?
2018.03.02 12:50:02 INFO web[o.s.s.r.RegisterRules] Register rules
2018.03.02 12:50:03 INFO web[o.s.s.n.NotificationService] Notification service stopped
2018.03.02 12:50:03 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: XML is not valid
at org.sonar.api.server.rule.RulesDefinitionXmlLoader.load(RulesDefinitionXmlLoader.java:233) ~[sonar-plugin-api-5.6.7.jar:na]
at org.sonar.cxx.sensors.utils.CxxAbstractRuleRepository.define(CxxAbstractRuleRepository.java:99) ~[na:na]
at org.sonar.server.rule.RuleDefinitionsLoader.load(RuleDefinitionsLoader.java:54) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.rule.RegisterRules.start(RegisterRules.java:97) ~[sonar-server-5.6.7.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-5.6.7.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-5.6.7.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:45) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:80) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:44) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:77) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:201) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.platform.Platform.doStart(Platform.java:114) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.platform.Platform.doStart(Platform.java:99) ~[sonar-server-5.6.7.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44) ~[sonar-server-5.6.7.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.32.jar:8.0.32]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.32.jar:8.0.32]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: com.ctc.wstx.exc.WstxParsingException: Undeclared general entity "randdesc"
at [row,col {unknown-source}]: [250,29]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:614) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:487) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at com.ctc.wstx.sr.BasicStreamReader.handleUndeclaredEntity(BasicStreamReader.java:5470) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at com.ctc.wstx.sr.StreamScanner.expandUnresolvedEntity(StreamScanner.java:1742) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at com.ctc.wstx.sr.StreamScanner.expandEntity(StreamScanner.java:1626) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1564) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2748) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1073) ~[woodstox-core-lgpl-4.4.0.jar:4.4.0]
at org.codehaus.staxmate.in.SMHierarchicCursor.skipToEndElement(SMHierarchicCursor.java:156) ~[staxmate-2.0.1.jar:na]
at org.codehaus.staxmate.in.SMHierarchicCursor.getNext(SMHierarchicCursor.java:103) ~[staxmate-2.0.1.jar:na]
at org.sonar.api.server.rule.RulesDefinitionXmlLoader.load(RulesDefinitionXmlLoader.java:227) ~[sonar-plugin-api-5.6.7.jar:na]
... 36 common frames omitted
2018.03.02 12:50:03 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2018.03.02 12:50:03 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
After all, I had to re-construct MySQL to make SQ run. The cause is that the RATS rules were given to 'sonar.cxx.rats.reportPath'. But it is clear that the cxx pulgin never checks it.
I have recently begun running Sonarqube 7.0 from Jenkins using MSBUILD.
Several runs were successful, but intermittently (and now repeatedly) I find a failure in the execution.
The below is the final failure with the verbose=true setting.
Has anyone had this similar experience, and additionally, has any one found a solution?
12:05:33 12:05:33.540 INFO: ------------------------------------------------------------------------
12:05:33 12:05:33.540 INFO: EXECUTION FAILURE
12:05:33 12:05:33.540 INFO: ------------------------------------------------------------------------
12:05:33 12:05:33.540 INFO: Total time: 1:25.012s
12:05:33 12:05:33.618 INFO: Final Memory: 50M/99M
12:05:33 12:05:33.618 INFO: ------------------------------------------------------------------------
12:05:33 12:05:33.618 ERROR: Error during SonarQube Scanner execution
12:05:33 java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.report.MetadataPublisher
12:05:33 at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
12:05:33 at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
12:05:33 at org.picocontainer.parameters.CollectionComponentParameter.getArrayInstance(CollectionComponentParameter.java:334)
12:05:33 at org.picocontainer.parameters.CollectionComponentParameter.access$100(CollectionComponentParameter.java:49)
12:05:33 at org.picocontainer.parameters.CollectionComponentParameter$1.resolveInstance(CollectionComponentParameter.java:139)
12:05:33 at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:141)
12:05:33 at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
12:05:33 at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
12:05:33 at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
12:05:33 at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
12:05:33 at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
12:05:33 at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
12:05:33 at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
12:05:33 at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
12:05:33 at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1034)
12:05:33 at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1026)
12:05:33 at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1003)
12:05:33 at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
12:05:33 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
12:05:33 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
12:05:33 at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
12:05:33 at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
12:05:33 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
12:05:33 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
12:05:33 at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
12:05:33 at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
12:05:33 at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
12:05:33 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
12:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
12:05:33 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:05:33 at java.base/java.lang.reflect.Method.invoke(Method.java:564)
12:05:33 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
12:05:33 at com.sun.proxy.$Proxy0.execute(Unknown Source)
12:05:33 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
12:05:33 at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
12:05:33 at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
12:05:33 at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
12:05:33 at org.sonarsource.scanner.cli.Main.main(Main.java:61)
12:05:33 Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.rule.ModuleQProfiles
12:05:33 at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
12:05:33 at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
12:05:33 at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
12:05:33 at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
12:05:33 at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
12:05:33 at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
12:05:33 at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
12:05:33 at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
12:05:33 at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
12:05:33 at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
12:05:33 at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
12:05:33 at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
12:05:33 at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
12:05:33 at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
12:05:33 at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
12:05:33 ... 38 more
12:05:33 Caused by: java.lang.IllegalStateException: Fail to request http://sonarqube:9000/api/qualityprofiles/search.protobuf?projectKey=CCGeneral
12:05:33 at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:190)
12:05:33 at org.sonarqube.ws.client.HttpConnector.get(HttpConnector.java:124)
12:05:33 at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:111)
12:05:33 at org.sonar.scanner.bootstrap.ScannerWsClient.call(ScannerWsClient.java:73)
12:05:33 at org.sonar.scanner.repository.DefaultQualityProfileLoader.call(DefaultQualityProfileLoader.java:90)
12:05:33 at org.sonar.scanner.repository.DefaultQualityProfileLoader.loadAndOverrideIfNeeded(DefaultQualityProfileLoader.java:69)
12:05:33 at org.sonar.scanner.repository.DefaultQualityProfileLoader.load(DefaultQualityProfileLoader.java:64)
12:05:33 at org.sonar.scanner.repository.QualityProfileProvider.provide(QualityProfileProvider.java:45)
12:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:05:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
12:05:33 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:05:33 at java.base/java.lang.reflect.Method.invoke(Method.java:564)
12:05:33 at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
12:05:33 at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
12:05:33 at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
12:05:33 at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
12:05:33 at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
12:05:33 at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
12:05:33 at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
12:05:33 at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
12:05:33 at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
12:05:33 at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
12:05:33 at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
12:05:33 12:05:33.649 DEBUG: Execution getVersion
12:05:33 12:05:33.649 DEBUG: Execution stop
12:05:33 ... 52 more
12:05:33 Caused by: java.net.SocketTimeoutException: timeout
12:05:33 at okio.Okio$4.newTimeoutException(Okio.java:227)
12:05:33 at okio.AsyncTimeout.exit(AsyncTimeout.java:284)
12:05:33 at okio.AsyncTimeout$2.read(AsyncTimeout.java:240)
12:05:33 at okio.RealBufferedSource.indexOf(RealBufferedSource.java:344)
12:05:33 at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:216)
12:05:33 at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
12:05:33 at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
12:05:33 at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
12:05:33 at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:207)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
12:05:33 at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
12:05:33 at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
12:05:33 at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
12:05:33 at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
12:05:33 at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
12:05:33 at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
12:05:33 at okhttp3.RealCall.execute(RealCall.java:69)
12:05:33 at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:188)
12:05:33 ... 74 more
12:05:33 Caused by: java.net.SocketTimeoutException: Read timed out
12:05:33 at java.base/java.net.SocketInputStream.socketRead0(Native Method)
12:05:33 at java.base/java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
12:05:33 at java.base/java.net.SocketInputStream.read(SocketInputStream.java:171)
12:05:33 at java.base/java.net.SocketInputStream.read(SocketInputStream.java:141)
12:05:33 at okio.Okio$2.read(Okio.java:138)
12:05:33 at okio.AsyncTimeout$2.read(AsyncTimeout.java:236)
12:05:33 ... 97 more
12:05:33 12:05:33.649 ERROR:
12:05:33 12:05:33.649 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
12:05:34 Process returned exit code 1
12:05:34 The SonarQube Scanner did not complete successfully
12:05:34 12:05:34.402 Creating a summary markdown file...
12:05:34 12:05:34.402 Post-processing failed. Exit code: 1
12:05:34 ERROR: Execution of SonarQube Scanner for MSBuild failed (exit code 1)
12:05:34 Finished: FAILURE
It appears that my issue seems to have stemmed from a lack of disk space on the Jenkins server. I freed some disk by clearing out some old/unused workspaces, and the job has run successfully several times since.
We are currently using sonar 4.3.3 release and hudson is used to have the E2E CI flow.It was observed in few of our build jobs that connection reset error was encountered but I am not sure what could be the probable reason.Below are the snippet of errors.Any inputs are highly appreciated.
Snippet of Error 1 :
:sonarRunner FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonarRunner'.
> Fail to download libraries from server
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarRunner'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:289)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:46)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:37)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.Bootstrapper.downloadBatchFiles(Bootstrapper.java:166)
at org.sonar.runner.Bootstrapper.createClassLoader(Bootstrapper.java:89)
at org.sonar.runner.Runner.createClassLoader(Runner.java:229)
at org.sonar.runner.Runner.execute(Runner.java:151)
at org.sonar.runner.Runner$execute.call(Unknown Source)
at org.gradle.api.sonar.runner.SonarRunner.run(SonarRunner.groovy:52)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute
(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 43 more
Caused by: java.lang.IllegalStateException: Fail to download the file: http://XXXX/sonar/batch/xstream-1.3.1.jar
at org.sonar.runner.Bootstrapper.remoteContentToFile(Bootstrapper.java:115)
at org.sonar.runner.Bootstrapper.downloadBatchFiles(Bootstrapper.java:161)
... 56 more
Caused by: java.net.SocketException: Connection reset
at org.sonar.runner.IOUtils.copyLarge(IOUtils.java:67)
at org.sonar.runner.Bootstrapper.remoteContentToFile(Bootstrapper.java:111)
... 57 more
BUILD FAILED
Snippet of Error 2:
ERROR: Error during SonarQube Scanner execution
org.sonar.api.utils.SonarException: Unable to download '/batch_bootstrap/db?project=com.oracle.emaas.static.emcapms:develop' to: /scratch/aime/workspace/EMAAS-Prod-EMCAPMS_Build/.sonar/.sonartmp/preview1488173392228-0.h2.db
at org.sonar.batch.bootstrap.ServerClient.download(ServerClient.java:73)
at org.sonar.batch.bootstrap.PreviewDatabase.downloadDatabase(PreviewDatabase.java:85)
at org.sonar.batch.bootstrap.PreviewDatabase.start(PreviewDatabase.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.executeOldVersion(BatchIsolatedLauncher.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.executeOldVersion(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:245)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
at org.sonarsource.scanner.cli.Main.main(Main.java:60)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.MeteredStream.read(MeteredStream.java:134)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3066)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3060)
at com.google.common.io.ByteStreams.copy(ByteStreams.java:192)
at com.google.common.io.ByteStreams.copy(ByteStreams.java:120)
at com.google.common.io.Files.copy(Files.java:231)
at org.sonar.batch.bootstrap.ServerClient.download(ServerClient.java:69)
... 31 more
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Performing Post build task...
You're using an unsupported version of SonarQube.
You should migrate to latest LTS (5.6), as I don't expect anyone to be able to help you.