2016-09-21 129 views
1

我正在使用Gradle 3.1和SonarQube 2.1的Gradle插件。當我使用SonarQube 6.0和適用於Java 4.2的SonarQube插件運行gradle sonarqube時,一切正常。 然而,當我升級到SonarQube 6.1-RC1,然後我得到以下堆棧跟蹤:從6.0升級到6.1後的CNFE -RC1

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 
+0

SonarQube 6.1-RC1,認真嗎?它還沒有被宣佈,爲什麼我你甚至試圖這樣做? –

+0

大約3年以來,我在我的「軟件工程」類中使用SonarQube。在學期開始之前,我正在檢查最新版本是否可以正常使用我的示例。 –

+0

在6.1進入General Availability之前(應該在〜2周內發生),最新版本的SonarQube是6.0 :-) –

回答

5

您正在使用CSS SonarQube插件不兼容的版本。您應該使用最新版本(2.1),該版本應該與即將推出的SonarQube版本兼容。